G
Guest
Hello
I have an Issue using a subform, while using the VBA coding
The main form contains a List box holding all the users and three buttons,
delete to delete a user, add, which bring up a window to add one, and exit.
The Sub form contains three check boxes corresponding to the permissions of a
form, Edit, Delete, and Add.
The issue is that when I delete or add a record, the form and subform get
out of sync. This is due to the fact that the list box does not agree with a
form subform connection (at least I tried and couldn't work it) so I simply
coded the record change maually into the form. Here where the problem lies, I
don't know how to reference the subform in code to move its record along with
the main form what I have is:
'i is the index I want to go to, frmAccess is the main form
DoCmd.GoToRecord acDataForm, "frmAccess", acGoTo, i
'subUsers is the subform
DoCmd.GoToRecord acDataForm, "subUsers", acGoTo, i
When I try to run it it tells me that "The Object subUsers is not open" and
give a similar error for when I reference the form that the subform
references.
Any help would be greatly appreciated.
I have an Issue using a subform, while using the VBA coding
The main form contains a List box holding all the users and three buttons,
delete to delete a user, add, which bring up a window to add one, and exit.
The Sub form contains three check boxes corresponding to the permissions of a
form, Edit, Delete, and Add.
The issue is that when I delete or add a record, the form and subform get
out of sync. This is due to the fact that the list box does not agree with a
form subform connection (at least I tried and couldn't work it) so I simply
coded the record change maually into the form. Here where the problem lies, I
don't know how to reference the subform in code to move its record along with
the main form what I have is:
'i is the index I want to go to, frmAccess is the main form
DoCmd.GoToRecord acDataForm, "frmAccess", acGoTo, i
'subUsers is the subform
DoCmd.GoToRecord acDataForm, "subUsers", acGoTo, i
When I try to run it it tells me that "The Object subUsers is not open" and
give a similar error for when I reference the form that the subform
references.
Any help would be greatly appreciated.