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

Hi guys need qiuck help with simple question

Status
Not open for further replies.

Lyubomyr

Programmer
Jul 23, 2005
21
0
0
UA
I have form in MS Access 2003 also i have query which has parameter. So i need to pass values gathered from the form fields to the parmeter of the query.

I have situation when it doesn't want to take values from form but call standart MsgBox with proposotions to input parameter

Thank you in advanced
 
Do you mean you want an Input Box for the parameter?

If so, you can use something like this:

Dim vJob As Variant

vJob = InputBox("Enter The Paramter Required.", "Parameter Info")

If vJob = "" Or IsNull(vJob) Then Exit Sub

If IsNumeric(vJob) Then
do something..
Else
do soemthing different..
End if

Mark...

[Worm]
 
Lyubomyr, your title doesn't say much. Have a look at FAQ219-2884 or FAQ181-2886

Now about your problem.

Place this in your query criteria

Forms!YourFormName!txtCriteriaText
 
The form must be open before the query is launched if you want to avoid the standard MsgBox ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How are ya Lyubomyr . . . . .

You can either:
[ol][li]Use a [purple]Parameter Query[/purple] to get the values into the criteria.[/li]
[li][purple]Reference[/purple] the values on the form in the criteria. Example:
Code:
[blue]   Forms!FormName!TextboxName[/blue]
[/li][li]In VBA you can construct the criteria of an [purple]SQL statement[/purple] and [purple]update the RecordSource[/purple] of a form with the final SQL.[/li][/ol]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top