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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Issue

Status
Not open for further replies.

avagodro

Technical User
Aug 12, 2005
83
US
I have a database which I have created in Access 2002. In the database, I have a form which has the form, then a subform within a subform. In the second subform, I have a combobox with is pulling criteria dependent on the record number which is currenly open. The forms and subforms are all in a relationship.
When I run the database in Access 2002 on my PC everything works as it should. However, when I go to a different computer, which is running Access 2003, I get presented with a Parameter Query for the combobox.
Any suggestions as to why the difference?
 
I think there might be two different reasons

1 - a bug/flaw
2 - incorrect referening

re #1 - check BUG: Enter Parameter Value Dialog Box Appears While Trying to Close a Form Window and/or some of the links within

re #2 - I think the 2003 version is less forgiving on incorrect syntax than previous versions.

See the following for correct referencing How to refer to a control on a subform or subreport in Access 2000 and Refer to Form and Subform properties and controls.

An easy way of obtaining correct references, is to invoke the expression builder from somewhere, then doubleclick through forms, loaded forms, main form, first subform, second subform then finally a control on the subform (if that's where you're referencing). This should give correct reference which should work on all versions. Or invoke the expression builder from anywhere you like, doubleclick to where you wish to reference ...

I suppose the referencing from a subforms subform to a main form, could look something like this:

[tt]me.parent.parent.form!txtControl.value ' or
me.parent.parent!txtControl.value[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top