|
Question : Togglelink
|
|
I want to place a command button on a main form that will go to the subform. I then want two buttons on the subform. One that will return to a new entry on the main form and one that will close the entire form. When I place the controls on the form I get "Microsoft Office Access can't find the field 'Togglelink' referred to in your expression. What do I need to do to correct this?
|
|
Answer : Togglelink
|
|
ok, on mainform, say your button is called cmdSub
private sub cmdSub_Click() Me.nameofmysubform.SetFocus end sub
on the subform, two buttons, one called cmdMainAdd one called cmdClose
private sub cmdMainAdd_Click() Me.Parent.SetFocus DoCmd.GoToRecord , , acNewRec end sub
private sub cmdClose_Click() DoCmd.Close acForm, Me.Parent.Name end sub
|
|
|
|