Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Equating values on different forms.

Status
Not open for further replies.

dulla

Technical User
Feb 3, 2003
54
i am trying to load the value of a field in one form (Clients Information) to the value of a field in another form (Workshop Attendees). The button with the event is located in a subform of Clients Information called Counseling Session (1 to many). Once the proper workshop is chosen from counseling session form, i would like for the name on the parent form (Clients) to be loaded into the name field on another form called Workshop Attendees. when i try this, i get an error "Microsoft Access cannot find the form Workshop Attendees referred to in a macro expression or visual basic code":

Private Sub Workshop_Enter_Click()

Forms![Clients Information]![Last Name].Value = Forms![Workshop Attendees]![Last Name].Value

End Sub

What should i do?? thanks.

ameen
 
Ensure that the form "Workshop Attendees" is open when you try and assign the value. If it's not, you will get an error.

Otherwise, check the form name.
 
ok. when i open the form i am not getting that error. however, i have kept the workshop attendees form as a subform within the main form also, so isnt is open all the time when the main form is open? would i have to open the subform separately each time?? i would really like to avoid this.
 
If it is open as a subform, it is considered "open", so there should be no problem.


The only other thing I can think of is that you may have a conflict with identifiers. Is one of your fields named "Last Name"? If so, change your textbox control so it is something like "txtLastName", and see if the statement now works.

Other than that, I'm stumped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top