Link to home
Start Free TrialLog in
Avatar of davetough
davetough

asked on

question on search in a form

Hello,
attaching database-
when you open it -  you will see form [frmSearch]
I use this code in unbound textbox in header:*****************************
Private Sub txtOne_AfterUpdate()
If Nz(DLookup("[TTID]", "tbl1", "[TTID]=" & Chr(34) & Me.txtOne & Chr(34)), "") > "" Then
       Me.Requery
       Me.Computers.SetFocus      
Else
MsgBox "TTID does not exit!"
Me.txtOne = ""
Cancel = True
End If
End Sub
************************************
I have a database where I use this and am able to have form open with just the unbound text box and then user enters TTID number- hits enter and then the form displays the full form with [qty], [so#], and [TTID]-

NOW- when open the form and a the query the form is based on - brings up an [enter parameter form] -

can you see what i am not doing or doing wrong?
thank you
Example-A1.accdb
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of davetough
davetough

ASKER

thanks!! named form incorrectly