gtadamsesq
Aug 1 2005, 08:38 AM
I designed a OwnerLookup form using the form design wizard; selected “Tabular” view; and using the Toolbox / Command button option, installed a button to “Open A Form” when clicked. The OwnerLookup form scrolls nicely through available records, but clicking the “Open Form” button always opens the first record only, not the record scrolled to. I also designed a similar form using “Columnar” view, and the installed “Open A Form” button opens the form at the selected record. I don’t understand why the form designed in “Tabular” view won’t do the same thing. What have I done wrong?
You probably didn't set any "wherecondition" argument in the OpenForm statement.
Check Access VB on the OpenForm Method and its argument. You need to specify the "wherecondition" argument using a value that uniquely identifies the CurrentRecord on the OwnerLookUp Form.
gtadamsesq
Aug 2 2005, 02:17 AM
Thanks!
Once I got the
Dim stLinkCriteria As String
and
stDocName = "Update Record Owner"
stLinkCriteria = "[pLastName] = '" & [PLASTNAME] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
entered in the onclick, it worked like a charm.
George
You're welcome. Glad you worked it out easily.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.