reference unbound subform controls.

Riru

New member
Local time
Today, 16:14
Joined
May 13, 2014
Messages
4
I have placed an unbound subform on a form. I have the following code which loads in different datasheet to the subform:

'Loads in NewQuery
Me.data.SourceObject = "query.NewQuery"

'Loads in NewQuery2
Me.data.SourceObject = "query.NewQuery2"

etc.... this works fine to show these queries but i want to know how to reference the fields on the datasheet.

for example one of the fields in NewQuery is "ID"... When clicked i want to run code... normally on bound subform i could go for example ID_Click()... msgbox(me.ID)

how can i reference these other fields on unbound???

ask if you need more information.
 
Thanks bob fitz... although I already knew that it seems I needed reminding.

Next question, How do you assign a macro/code to this control?
 
Thanks bob fitz... although I already knew that it seems I needed reminding.

Next question, How do you assign a macro/code to this control?
I'm sorry but I can't help with macros. I haven't used them for many years.
To write some code you would open the form in design mode, select the control, open its property sheet, select [Event Procedure] from the drop down list in the appropriate event, then click the ellipse (...) found just to the right. That will open the forms code module.
 

Users who are viewing this thread

Back
Top Bottom