DoCmd.GoToRecord then select based on a query

BennyLinton

Registered User.
Local time
Today, 11:01
Joined
Feb 21, 2014
Messages
263
I have a subform that displays one at a time the customer's address based upon the Customer in the parent form. Each customer may have several addresses with only one marked preferred. The addresses are in a separate table from the customer lis. Is there a way to have the customer's preferred address be the first one in the subform based on whether or not it is the preferred address? I'm thinking "DoCmd.GoToRecord" with a query result as one of the arguments may be a start (?) Thanks!
 
do you have field [preferred address] on the table in the subform?
if you have one you can add sort order on the subform.
 
Yes there is a checkbox on the subform for 'preferred'. Should I code the subform's 'on load' event? With a query?
 
just bring your subform in design view.
on the form's Property Sheet->Data->

Order By: [preferred address field name]
Order By On Load: Yes
 

Users who are viewing this thread

Back
Top Bottom