Combo Problem (1 Viewer)

DJNickWatt

Registered User.
Local time
Today, 23:18
Joined
Feb 29, 2008
Messages
25
Access 2007

I have a popup form which I am using to filter the records on the main form depending on what value is selected from a number of combo boxes. I use the values in the combos to write my own sql statement to determine the recordset on the main form. When the user changes a combo it calls a public function on the main form to perform the sql change.

When trying to reference a combo on the popup form from the main one I am using:

Form_POPUP_DRAFT_FILTER.comboMachine.Value

All this returns is the default value set for the combo no matter what value is selected.

So I then tried a couple of things to see what is going on. In the combo change event I placed:

Debug.Print Form_POPUP_DRAFTS_FILTER.comboModels.Value
Debug.Print Me.comboModels.Text


The first line returns the default value but the second line returns the correct value as selected. The form name I am using IS correct.

What is annoying is for another section of the SAME database I am doing exactly the same thing using 2 different forms and it works.

Any help would be greatly appreciated.

Nick

Access 2007
 

boblarson

Smeghead
Local time
Today, 15:18
Joined
Jan 12, 2001
Messages
32,059
When referencing the value of a combo on another form, the NORMAL syntax is:

Forms!POPUP_DRAFTS_FILTER.comboModels

You don't need the .Value and if you use .Text the control must have the focus.

As for why it would not work on one and work on others, I would suggest you make sure that all of the computers in question have the Office 2007 SP1 applied.
 

Users who are viewing this thread

Top Bottom