spidermman
11-04-2008, 09:27 AM
Private Sub Command13_Click()
Dim abc as string
abc = Combo10.Value
…
…
…
forms!abc.Check1 = rst![name] ‘assign check1 to one recordset checkbox
DoCmd.OpenForm abc, acNormal
End Sub
This command 13 button will open a form according to the combo10.value which the user chooses. I have many different forms’ names assigned to combo10.
There is an error when I run the above code because the forms!abc.check1 has an error.
This is because access cannot read the different forms names under abc.
Is there another way for forms!abc.Check1 to work when the forms names under abc will change?
Thanks.
Dim abc as string
abc = Combo10.Value
…
…
…
forms!abc.Check1 = rst![name] ‘assign check1 to one recordset checkbox
DoCmd.OpenForm abc, acNormal
End Sub
This command 13 button will open a form according to the combo10.value which the user chooses. I have many different forms’ names assigned to combo10.
There is an error when I run the above code because the forms!abc.check1 has an error.
This is because access cannot read the different forms names under abc.
Is there another way for forms!abc.Check1 to work when the forms names under abc will change?
Thanks.