Al,
I moved the SQL language to the CustomerNumber field of the query and it
reads:
[Forms]![xfrmCustomerReview]![xfrmCustomerReviewSubform].[Form]![CustomerNumber]
When I save the forms and open the main form (frmCustomerReview) and click
in the AccountNumberID field of the frmCustomerReviewSubform, I get a
parameter value prompt to enter the customer number. The prompt reads:
Forms!xfrmCustomerReview!xfrmCustomerReviewSubform.Form!CustomerNumber
When I enter the current customer number and press Enter, the applicable
account numbers for the customer will be displayed and I can choose one. If I
go to another record and click in the account number field of the subform,
the same account numbers are displayed??
David
:
Al,
Thank you for your reply. I have tried to do what you suggested but am still
not having any luck.
The SQL view of my query within theAccountNumberfield of the subform reads:
SELECT tblCustAndAcctNumbers.[Account Numbers]
FROM tblCustAndAcctNumbers
WHERE (((tblCustAndAcctNumbers.[Account
Numbers])=[Forms]![xfrmCustomerReview]![xfrmCustomerReviewSubform].[Form]![CustomerNumber]))
ORDER BY tblCustAndAcctNumbers.[Account Numbers]
My main form is called xfrmCustomerReview.
The subform which is tied to the customer number from the main form is
called xfrmCustomerReviewSubform.
The other subforms on the main form are frmCustAndAcctNumbers and
frmAddlCustNumbers which are working correctly.
The frmCustAndAcctNumbers form on the main form contains the account numbers
that pertain to the displayed customer and are the numbers that I want to be
able to select in the AccountNumber field of the xfrmCustomerReviewSubform.
I can enter the account numbers manually in the subform and the dropdown box
will show me the numbers as I enter them. At the point at which I have a
match I can tab to the next field and enter the remaining information for the
subform.
I am fairly new to Access and am still learning much of what I need to be
doing as I go along. Productivity is at a snail's pace at present.
Thank you for helping me!
David
:
David,
Filter the query behind your sub's combo box by including the CustNo field in
that
query and using a criteria of...
(use your own names)
=Forms!frmYourMainFormName!frmYourSubformName.Form!CustomerNumber
I'm assuming the Main and Sub forms are linked (Parent to Child) via the
CustomerNumber. If so, there's no need to "display" the CustomerNumber in the
sub.
Every
time you add a new record, the linked CustomerNumber value is forced into the
CustomerNumber field by the relationship.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
I have a form that contains 3 subforms. Two of the subforms are working
correctly, however I am having a problem getting my information to display
correctly on the third subform.
Within this subform the customer number displayed is keyed to the main form
customer number and is working correctly. However, when you select the
dropdown for the combo box on the account number field within that subform it
shows all of the account numbers for all the customers. I want it to only
show the account numbers that pertain to the customer number shown in the
main form.
How can I do this, please?
David Vollmer