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

link Criteria when opening forms

Status
Not open for further replies.

4321z

Programmer
Oct 21, 2003
45
GB
This is probaly really easy but i can't suss it, i'm trying to open a form using the link criteria and i don't want a specific value i want similar values, here's the link i'm trying:

stLinkCriteria = "[Address] '" Like " ''*" & strInputSearchWord & "*'"

but it doesn't like it much, any ideas?
 
try
stLinkCriteria = "[Address] Like '*" & strInputSearchWord & "*'"
 
this doesn't seem to work either

stLinkCriteria = "[Address] Like '*" & strInputSearchWord & "*'"

i just get everything, the strInputSearchWord variable is coming from an input box
 
hi I just tried it out : I have a form with a command button, on the on click event of this form, I have this code :
DoCmd.OpenForm "frm", acNormal, , "[spec] like '*" & InputBox("speciality") & "*'"
and it opens another form that is filtered on the criteria.

can you explain more in detail how you are proceeding ?
 
yeh here's the whole code

Dim stDocName As String
Dim stLinkCriteria As String
Dim strInputSearchWord As String

strInputSearchWord = InputBox("Please Enter Your Search Word", "Master Database", "*")
If Len(strInputSearchWord) <= 0 Then
Exit Sub
End If

stDocName = &quot;HelpFindAddressOuter&quot;
stLinkCriteria = &quot;[Address] Like '*&quot; & strInputSearchWord & &quot;*'&quot;
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly
 
hi

I copy/pasted you code and it works fine !
have you opened the form in design mode then have a look at the DATA properties : FILTER. It should contain the characters you entered.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top