Reference a field on subform of navigation form (access 2010) (1 Viewer)

liddlem

Registered User.
Local time
Today, 11:08
Joined
May 16, 2003
Messages
339
I have developed a db in Access2007 - it was used to generate and print barcodes for our library system.

I have recently upgraded my MS Offcie to 2010 and need to add another component that manages loans of our hardware.

So I thought I'd upgrade the front-end of the original db for use on a sharepoint server. So . . .

On the old version, I had 3 forms related to barcode generation.
A. Add Barcodes and
B. RePrint a Box Set and
C. Reprint a range of barcodes.

So when investigating the new features of 2010, I thought that I would create a navigation form (called Frm_Switchboard) with two Navigation buttons on the left. (Barcodes and HardwareLoans) - See the attached image

When the user selects Barcodes, then a subform (which is another navigation form) displays.

Now this is where I get stuck.
When the user clicks the "Print this Range" button, the report sources data from a query that refered to the form. On the old db, it was the only one open, so it was easy to reference the "Start" and "End" range.

How do I reference this field in 2010?
I have tried the following;
[Forms]![Frm_Switchboard]![NavigationButton11].
[Forms]![Frm_Switchboard]![NavigationSubform].

In both these cases, the intellisense(?) popup doesnt offer me an option that makes sense.


Similarly, I am trying to insert a record in the loans field and have this query which also does not work - for the same reason.

INSERT INTO tbl_Loans ( MachineID )
SELECT [Forms]![Frm_Switchboard]![Forms]![Frm_HardwareLoans]![Forms]![Frm_Loans]![MachineID] AS MachName;

Thanks
 

Attachments

  • AccessLibrary.png
    AccessLibrary.png
    14.4 KB · Views: 1,101
Last edited:

liddlem

Registered User.
Local time
Today, 11:08
Joined
May 16, 2003
Messages
339
Eureeka - I found the answer.

Do NOT refer to the subforms by its name, but rather use "NavigationSubform" as follows.

[Forms]![Frm_Switchboard].[Form]![NavigationSubform].[Form]![NavigationSubform].[Form].[MachineID]

I was using
[Forms]![Frm_Switchboard]![Forms]![Frm_HardwareLoans]![Forms]![Frm_Loans]![MachineID]
which did not work.


Incidentally, the "intellisense" tool did not offer this as a suggestion.
Maybe MS Redmond is interested in making the intellisense a little more intuitive than it already is?

Thank to all those who took a look - even if you couldnt respond.
 

ghorwith

New member
Local time
Today, 06:08
Joined
Dec 11, 2018
Messages
3
Thank you liddlem. This was driving me a bit nuts:banghead::banghead:. Your solution works perfectly:)
 

Users who are viewing this thread

Top Bottom