Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter Command Button 1

Status
Not open for further replies.

jfussell

Technical User
Jul 17, 2001
66
US
I need some help creating a command button for a form that can: 1) opens another form, 2) filters through the open form and only show the records that is linked to a "client ID" field in the initial form.
Thanks a ton!!
 
You need something similar to the following code. Put this in the click event of your command button.

Dim LinkFilter as string
Dim FormName as string

LinkFilter = ""
if not(isnull(me!clientid)) then
LinkFilter = "[Clientid] = " & Me!clientID
end if

FormName = <your form>
DoCmd.OpenForm FormName, acNormal, , LinkFilter


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top