Query Error when getting value form ComboBox on subform

G

Guest

I'm getting the following error when using the row source of a combobox to
build a query limited from another combobox - "Invalid bracketing of name".
Both comboboxes exist on a subform.

Here's is my exact syntax for the query criteria with the respective
mainform and subform names:
[Forms]![frm Research Database Users]![frm Research Database
Subform.Form]![SYSTEM]

I also tried the following which didn't generate an error, but did not work
either:
[Forms]![frm Research Database Users]![frm Research Database
Subform].[Form]![SYSTEM]
 
G

Guest

First, you should use

[Forms]![frm Research Database Users]![frm Research Database
Subform].[Form]![SYSTEM]

Did you refresh the second combo after you selected a value in the first
combo "SYSTEM"

On the AfterUpdate event of the first combo, run the code
Me.[SYSTEM].Requery
===============================
If it's not the case, then after selecting a value in the first combo, open
the Immidiate window (press Ctrl+g) and type

?[Forms]![frm Research Database Users]![frm Research Database
Subform].[Form]![SYSTEM]

Press enter, and see what value returned, and if this is the value you are
looking for the filter
 
G

Guest

OK, I gave it a go with your change. I'm no longer gatting an error, but
it's not finding the value. I get a pop-up titled Enter Parameter Value -
"Forms!frm Research Database Users!frm".

Could it be my form name or subform name?

Yes, I had the refresh of the first combobox.

Ofer said:
First, you should use

[Forms]![frm Research Database Users]![frm Research Database
Subform].[Form]![SYSTEM]

Did you refresh the second combo after you selected a value in the first
combo "SYSTEM"

On the AfterUpdate event of the first combo, run the code
Me.[SYSTEM].Requery
===============================
If it's not the case, then after selecting a value in the first combo, open
the Immidiate window (press Ctrl+g) and type

?[Forms]![frm Research Database Users]![frm Research Database
Subform].[Form]![SYSTEM]

Press enter, and see what value returned, and if this is the value you are
looking for the filter

--
\\// Live Long and Prosper \\//
BS"D


DV said:
I'm getting the following error when using the row source of a combobox to
build a query limited from another combobox - "Invalid bracketing of name".
Both comboboxes exist on a subform.

Here's is my exact syntax for the query criteria with the respective
mainform and subform names:
[Forms]![frm Research Database Users]![frm Research Database
Subform.Form]![SYSTEM]

I also tried the following which didn't generate an error, but did not work
either:
[Forms]![frm Research Database Users]![frm Research Database
Subform].[Form]![SYSTEM]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top