A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Click a subform field to open relevant form



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old May 28th, 2010, 02:38 AM posted to microsoft.public.access.forms
CDIT
external usenet poster
 
Posts: 2
Default Click a subform field to open relevant form

Hi, this is my first post )

l've created a main menu form in Access 2007 called “frmSwitchboard”
and embedded in that is a subform called "subfrmSwitchboard" that
contains all customer orders of a certain type (Active, Paid, Unpaid).
Each order has an Autonumber field called ID as it's primary key.

Linked to the ID field on the subform is a macro that should open up
"frmOrders" with the relevant order number's record shown when you
click the relevant ID number on the subform. If I open up the subform
on its own in datasheet view and click an ID field then the relevant
order form appears, great.

However, if I do this within the subform being present on the main
form (frmSwitchboard) it doesn’t, I get an input box appearing with
the WHERE clause from my macro showing:

Forms!subfrmswitchboard!ID

The WHERE clause in the macro is: [ID]=[Forms]![subfrmswitchboard]!
[ID]

If I type in the order ID then the form appears but I want this
nuisance not to be the case. Where have I gone wrong?

Many thanks in advance.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.