Hello everyone,
This is my first time posting here and I'm hoping someone can help me out. I'm a relative newbie to Access and am pretty much learning as I go along, so please bear with me.
Here is what I am trying to do. I'm building a simple database that will allow our engineering staff to enter in the items from the inventory warehouse that will be required for a project. Each inventory item has a unique part number, which is entered by the user.
I have a query set up that pulls all of the required information together, and then there is a report based on this query.
What I am ultimately trying to do is have a command button at the end of the order form that allows the user to print the order based on the current order number in the form.
I have set up the query criteria using:
[forms]![frm_Ordered_Items]![order_number]
If I have the frm_Ordered_Items open by itself, and put a command button at the bottom to open the report based on the query using this criteria, it works perfectly.
The problem is that I've set up the form as a sub-form, and once it's nested into the other form, a popup button comes up and calls for the query parameter to be entered manually. How can I change this so that it will perform the query and bring up the report automatically?
I hope I've given enough information to explain the situtation clearly.
9 18077
If you are trying to refer to a subform, you must first refer to the control on the main form that contains it. Then you can refer to the controls on the subform. - Forms!MainForm!frm_Ordered_Items.Form!order_number
Just replace MainForm with whatever the name is of your main form.
Welcome to Bytes
Don
Okay, I just cheered out loud in the middle of my super quiet office... everyone is wondering what the heck I'm up to now. :-)
That was exactly the fix. I've googled it a billion times and couldn't find the right syntax.
Thank you SO much!!
Glad I could help, good luck with your project.
Thanks for that link, that will be a big help in the future.
Printing that out for my stash of references.
NeoPa 32,557
Recognized Expert Moderator MVP
You're welcome AJ.
Do you realise we also have a whole forum ( Access Insights) just for such articles. To a large extent they are responses to Frequently Asked Questions. Issues that come up over and over again. There's other stuff there too, but it's where we put the answers we need to link to most.
Hi!
I think, I have the same problem but still wasn't able to fix it. Mine is 2 combo boxes, the 2nd combo box is based on a query, getting values related to the 1st combo box. It is working perfectly when not as a subform. But, when I make it as a subform, a parameter value is asked. How do I fix it? And, in ExpenseDetail table, I put, ExpenseID, which is a primary key in ExpenseT, also a table. Will I only be able to generate ExpenseIDs if I can fix my problem above? Please help!
Thanks,
This worked for me now. Just changed the name of the subform then followed your syntax. 👏👏👏👍🙏
NeoPa 32,557
Recognized Expert Moderator MVP
Please understand that we don't encourage extra questions to be posted into existing threads. That would get very messy very quickly.
Nevertheless, in this case, as you have already posted that you've got the answer from here, we'll treat it just like a simple Thank you. post which are allowed of course.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: KLAU |
last post by:
I have a field that retrieves information from an expression in a
query. I have used a DLookup function to get the calculated field
from the query. However, the relationship is 1-to-many so one...
|
by: Dave Boyd |
last post by:
Hi,
I have two very similar forms each with a subform. The main form gets
a few fields from the user and passes this back to a query that the
subform is bound to. The requery is done when the...
|
by: JM |
last post by:
Hello,
I've created a Querydef in a Form_Load() sub. The form is a subform
that no longer has linked child fields. The form is bound to this
querydef. When I open the form, the fields are...
|
by: Smartin |
last post by:
Using Access 97
I am trying to create a form that allows for user entry of search terms
and displays a table of results. I thought I could accomplish this using
a subform but it isn't quite...
|
by: bcreighton |
last post by:
I have created a bound subform on an unbound masterform linked together
with a common field (A store's identification number) using an unbound
combobox on the masterform and an invisible field on...
| |
by: keliie |
last post by:
Hello
Just a quick question that I've spent a few hours trying to solve with
no luck (although one would think this should be fairly easy).
I have a form with a subform. The subform is based...
|
by: Ron |
last post by:
Hi All,
Using Access2000, winXP.
Table 1 = tblClients displayed on frmClients via qryClients. 2nd table =
tblInvoices shown on frmInvoices via qryInvoices. 2nd table = tblDetails
shown on...
|
by: stevecat |
last post by:
Hi there,
I have created a form, "search" and a query "search_product". The query returns the product information based upon the criteria for three of the fields, author, title or isbn. The field...
|
by: Regnab |
last post by:
I've got a form - "frmLookup" (with a subform) that works very happily
on its own. The form has a list box, which when updated requeries the
subform to display the appropriate results.
The...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |