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!

How to pass INPUTBOX value to Query

Status
Not open for further replies.

jwkolker

Programmer
Jan 9, 2003
68
US
I have tried the adice in this thread but I still don't have it working - want a popup box for start date then want to do >= to that date for query criteria - take a peek at jo's solution - it gets me most of the way there but after the entry into the popup how do i pass the value to the query?
The thread link is here
thread701-457099 John Kolker
Programmer
jwkolker@comcast.net
 
Hi John,

I seemed to have joined this thread half way through, so forgive me if I tell you something you have already heard.

I have an Inputbox that I use to input a password. I then pass this value onto a query so that I can verify the password and pass on a department name to a further query.

The way I have the password verification query set up is to have the criteria set up as [Forms]![Password Box]![Password Entry] - where Password Box is the name of the Form and Password Entry is the name of the name of the Text Box used to type in the password.

Don't know if that will help you - as I am still fairly new to Access myself
 

Hi again

I must have missed your alert in Tecum email folder otherwise I would have been back to you
can you just try copying below into the criteria line of your date field

>=[Please enter your date here in the format dd/mm/yy]


regards

jo
 
I using for this sometimes temporary saving of value in static variable (does not work in multiuser frontend database). I save the required value to Static function called SaveString and restore this value in query:

... WHERE (xxx.yyy=SaveString())

Function Savestring itself is simple:
Static Function SaveString(Optional whatToSave) As String
'
' temporary saving of string value
' calling function with argument saves argument value in static variable inside function
' calling function without argument restores value saved at last time (or empty string in case
' there are nothing is saved
'
Dim staticString As String

If IsMissing(whatToSave) Then ' in case of missing argument
SaveString = Nz(staticString, "") ' function should return the value
Exit Function
Else
staticString = whatToSave ' in case of existing argument value should be
SaveString = "" ' saved to static variable
End If
End Function

may be helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top