G
Guest
I use several cmdbuttons to open the same form frmCust to display records. I
open the form with the following:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCust"
stLinkCriteria = "[StatusID] = 1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Each cmdbutton has the stLinkCriteria = "[StatusID] = ?" changed. ? = 1 for
Active, 2 for Inactive, 3 for Deceased, etc.
Once the form is open I use a list box to go to specific records. The
problem is the list box is based on the original form and reads:
SELECT [qryCust].[Full name] FROM [qryCust];
How can I limit the list box to only display the records in the current
recordset of the form?
Thanks!
open the form with the following:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCust"
stLinkCriteria = "[StatusID] = 1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Each cmdbutton has the stLinkCriteria = "[StatusID] = ?" changed. ? = 1 for
Active, 2 for Inactive, 3 for Deceased, etc.
Once the form is open I use a list box to go to specific records. The
problem is the list box is based on the original form and reads:
SELECT [qryCust].[Full name] FROM [qryCust];
How can I limit the list box to only display the records in the current
recordset of the form?
Thanks!