Cannot select form with buton inside tabs

D_R_Wood

New member
Local time
Today, 10:46
Joined
Jan 23, 2014
Messages
4
I have a master form naed frmCuistomer. I thn have a set of tabs (not the navigation tabs) imbeded within frmCustomer. The tabs are Invoice (frmInvoice), Contacts *frmContacts), Notes (frmNotes) and Orders (frmOrders). All form are Single Form. There is another form named frmInv that displays an invoice in a formatted manner. frmINV gets its data from a q1uery called InvQ. It has a criteria that reads [Forms}![frmInvoice]![Invoice_ID]. I placed a button on frmInvoice that calls frmInv. If I run frmInvoice speperatly outside the tab the correct invoice displays. If I click the buttom from within the tab I am asked to enter the vale of [Forms}![frmInvoice]![Invoice_ID]. How do I call the frmInv form from the tab?
 
Ever heard of paragraphs or spell check ;) This is hard to read!

Anyway, my guess is that these subforms in the tabs are not named what you think they are named--the forms themselves may be named frmX but the subform control name that access assigns will not be the name you gave it. In design view, click on the subform got to properties>other tab and look at the name.

Then you have to properly reference the subform control in your code/macro (the control that matches the PK on frmInv--presumably Invoice_ID--so,

Forms.frmInvoice.SubformName.Form.Invoice_ID
 
Thank you for your answer. I must apologize, my hand slipped and I accidentally click the send button before I had fixed the spelling.

One of the things I have been struggling with in Access is how to find the names of things like the sub-form. I can find the name of frmInvoice in properties, but I cannot locate the other forms within tabs or other embedded objects. They seem to be invisible. How do I find the names of these forms?
 
Here is a picture showing how to find the name of the subform control on a form. Hope this helps!
 

Attachments

  • SubformName.jpg
    SubformName.jpg
    54.3 KB · Views: 82
Admittedly, it is a little odd: you can click on a subform in two ways. #1 shows you the link master/child field properties and the name (along with other properties), #2shows the recordset info and some other properties.

So if you click on the border you will see #1 if you click in the little square on the upper left side of the subform, you will see #2 (#2 is basically for the data and code and #1 is more general properties as well as aesthetics).

here is a picture of how to achieve #2
 

Attachments

  • #2.jpg
    #2.jpg
    27.4 KB · Views: 76
Versus #1 in this pic (which is what you need to do to see the name)
 

Attachments

  • #1.jpg
    #1.jpg
    46 KB · Views: 93

Users who are viewing this thread

Back
Top Bottom