MS Access Query Criteria Reference

wal2789s

New member
Local time
Today, 23:05
Joined
Oct 3, 2016
Messages
1
Hi Everyone.

I am struggling with referencing form controls within the query criteria.

I have 2 subforms that are within a Tab Control.

The first I have referenced as follows- Like "*" & [forms]![Airspace Overview].[Form]![FRM_AirspaceAnalysisSub]![AirspaceType] & "*"

The second as follows- Like "*" & [forms]![Airspace Overview].[Form]![FRM_SearchMulti]![SrchText] & "*"

The first reference works fine, however the second pops up with 'Enter Parameter Value' - 'Forms!Airspace Overview.Form!FRM_SearchMulti!SrchText' when loading the form.

If I click 'OK' without entering a parameter, it works as it should.

If anyone knows where I'm going wrong please advise me :D.

Thanks in advance,

Steve
 
Your links look correct.
Be sure to use the Picker. It always gets the syntax correct and yours seems to.
 
Unless you are intentionally using a parameter query, your problem is spelling.

When a query causes a popup to enter a value, it usually names the field it wants. That field is not spelled the same as the actual source field name in the table(s) underlying the query.

Based on other forum entries I have seen, field-name spelling is not 100% the cause, but for my personal experience with this condition, it is 100%

The reason it works after you hit enter to the input box is because it works with an empty string in that position in the query. I.e. the SYNTAX is correct and an empty string is a possible value. It is just that you really wanted some other value there.
 

Users who are viewing this thread

Back
Top Bottom