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

hi there, today the site is very

Status
Not open for further replies.

vinanti

Programmer
Mar 7, 2003
26
IN
hi there,

today the site is very slow,isn't it?
i had a lot of problems going through the kwyword search pages also,
anyways, does anyone there have a solution to my problem:
my code is:
i want to open the form based on 2 criteria i tried using and in place of & in the lnkcriteria but it wouldnot work even.

suppnm = Forms!mod_frm!supp_nm
compnm = Forms!mod_frm!comp_nm
lnkcriteria = ("[supplier name] = '" & Me![supp_nm] & "'" & "[company]='" & Me![comp_nm] & "'")
modvar = "modify"
If compnm = "All" Then
DoCmd.OpenForm "mast", acNormal, , "[supplier name] = '" & suppnm & "'", , , modvar
Else
DoCmd.OpenForm "mast", acNormal, , lnkcriteria, , , modvar
End If
DoCmd.Close acForm, "MOD_FRM", acSaveYes

plz help....

thnks in advance

bye ,
vinanti
 
this line is wrong
lnkcriteria = ("[supplier name] = '" & Me![supp_nm] & "'" & "[company]='" & Me![comp_nm] & "'")

try this
lnkcriteria = ("[supplier name] = '" & Me![supp_nm] & "'And" & "[company]='" & Me![comp_nm] & "'")

Dave
ToeShot@Hotmail.com
Today Is Tomorrows Yesterday. So Why Wait
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top