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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter on ADP form

Status
Not open for further replies.

Aliffi

MIS
Jan 9, 2005
51
BE
Hi !
Iam using ADP form as Front For SQL
now i have a form based on Dbo.contracts table
on the fomr header i have created a textbox and a button

textbox = searchc

what code i should write behind the button to first match the value entered in the textbox with a field in Dbo.contracts table
and then filter that record and show it on the form

help plz
aliffi
 
What I sometimes do is instead of a textbox to search for an id, I put a popup window on say the right side of the screen with a list of in this case the contacts. The user can scroll down the list and then pick the contact. I usually use double click over the id field to display another Form with all the information. The Form would allow filtering.

Here is an example of the code in the double click event.

Private Sub ProjectID_DblClick(Cancel As Integer)

Dim DocName As String
Dim LinkCriteria As String
'-- this passes the filter.
LinkCriteria = "autonumber = " & Me.AutoNumber
DocName = "Find specific project by staff 1_12_01 test"
DoCmd.OpenForm DocName, , , LinkCriteria

End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top