Open Form Via. Macro w/ Specific Order #

andmunn

Registered User.
Local time
Today, 15:27
Joined
Mar 31, 2009
Messages
195
Hello All,

I have a "SalesDatase" - and one of the forms of my sales database (frmSalesOrder) lists the details of one particular sale.

In this form, i have a subform (sfrmqryAllSalesOlders) which lists all the sales for the one particular sales person (list them by SalesID # - primary key).

I want to be able to click on this SalesID # and be taken diretly to that Sales # (shown in the same form as aboev - frmSalesordeR).

Any advice how to code this? been playing a while with it - but can't seem to get it to work:

[Forms]![frmSalesOrders]![sfrmqryAllSalesOrders]![SalesID]=[tblSalesDetailed]![SalesID]?

Any advice very much appreciated.
Andrew.
 
What action you use in macro,andmunn?
Try code:
[SalesID]=[Forms]![NameOfMainform]![NameOfSubform].[Form]![SalesID]
 
Hi,

Thank you for the help - i'm using the Macro with the action "open Form".

I then specificy:

Form Name: (the name of the form i want to open)
View: Form
Where Condition: [SalesID]=[Forms]![SalesForm]![SalesSubForm].[Form]![SalesID]
Windows Mode: Normal.

I tried using your code below, and i get a "pop-up" when i click on the field which states "enter paramter value". I used the exact structure you gave above...

Any advice? this is the same error i keep getting no matter which way i work around the "where condition".

Thank so much.
Andrew.
 

Users who are viewing this thread

Back
Top Bottom