473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Access 2003 Form - Query Builder Criteria Parent Form Reference

Hello Experts,

I have two systems written in Access 2003 that I'm in the process of merging. A user will be given a specific screen depending on his user name. I have a form (let's call it frmPMain) that I'd like to use as a stand-alone filter but I'd also like it to be a subform of another form (frmWMain).

My question is this - In SQL Query Builder is there a way that I can reference a field's parent form without an implicit reference to the exact form that the field is on?

Example:
I would like to replace Forms!frmPMain!txtSupplier and Forms!frmWMain!frmPMain!txtSupplier with something like Parent!txtSupplier in the criteria section of the query then requery the subform.

Any help would be appreciated!
Thanks
Sep 20 '07 #1
1 8362
hyperpau
184 Expert 100+
Yes. I can't use your form names but allow me to give you an example.

Let's say your Main form is name frmMain. then the subform of this is name subfrmMain. on the main form, there is a field named txtSupplier. the subform also has a field name txtSupplierFromMainForm.

if you want to reference the subform's txtSupplierFromMainForm field to the main form's txtSupplier field, you normally would do this as:
Forms!frmMain!txtSupplier

an alternative to this is:
Me.Parent!txtSupplier

remember to you period (.) in Me.Parent instead of exclamation mark (!)

Good luck!

Hello Experts,

I have two systems written in Access 2003 that I'm in the process of merging. A user will be given a specific screen depending on his user name. I have a form (let's call it frmPMain) that I'd like to use as a stand-alone filter but I'd also like it to be a subform of another form (frmWMain).

My question is this - In SQL Query Builder is there a way that I can reference a field's parent form without an implicit reference to the exact form that the field is on?

Example:
I would like to replace Forms!frmPMain!txtSupplier and Forms!frmWMain!frmPMain!txtSupplier with something like Parent!txtSupplier in the criteria section of the query then requery the subform.

Any help would be appreciated!
Thanks
Sep 21 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Bob | last post by:
Currently I am using this statement to translate 3 fields in my db thru Visual Basic. I import the data from one table to another then call the IFF statements and the NewDate to translate the...
4
by: armitageshanks | last post by:
Hi, I'm pretty new too Access 2000 and I have a database that I with the details of peoples names, i.e. surname, forename, ref number. I have another table with surname, forename, etc plus some...
0
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
14
by: Darin | last post by:
I have a table that I want to delete specific records from based on data in other tables. I'm more familiar with Access '97, but am now using 2003, but the database is in 2000 format. In '97, I...
3
by: AnandaSim | last post by:
Hi All, I'm experiencing what I think is a bug - can't figure out how it would be stated so difficult to search the NG. I have a form. It has four listboxes. Each listbox has a rowsource. The...
3
by: rrosynek | last post by:
I have a 2003 Access Database with several tables related in a one to many relationship with a parent I am looking to build a report which evaluates if different users of the table have all entered...
3
by: rhobson2 | last post by:
Hello, I wrote a database applicaiton using Access XP (2002) and everything has been working good for the client until they purchased a couple of new computers with Access 2003. The meetings...
3
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent...
1
by: DrJarmin | last post by:
Hello The problem is this: in the criteria for a list box I reference the parent form - and Access KEEPS changing the criteria for one that won't work. Details below: I have a couple of list...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.