selecting correct record (1 Viewer)

K

kenburr

Guest
I have created two forms that work great. The first one is used to create quotes for different parts for different customers. The second form has a subform and allows me to scroll by customers' names all the parts associated with that particular customer. What I want to add is a feature so that when the user clicks on the selected part in the second form it will automatically open up the first form with the form showing the data from the record selected from the second form. The first form uses an autonumber field, and I can scroll by autonumber, but I want to be able to go directly to the selected record. Any hlep on this would be greatly appreciated.
Ken Burr
 

Simon C

New member
Local time
Today, 14:59
Joined
Oct 1, 1999
Messages
6
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmProducts"

stLinkCriteria = "[ProductID]=" & Me![Child78]![ProductID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

'Products' being the form you want to open, 'Child78 being the subform on the current form, 'ProductID' being the ID field to be looked for on the form you are opening.

Good luck.

Simon C
 

Users who are viewing this thread

Top Bottom