Form Perameter Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hallo

I hope some one can help me. I need to code if i click on a butten it needs
to ask for a perameter like a month where i can enter a value and then set
that value to a hiden field in a form. If some one can help me with the code
for that.

Thank you
Markus
 
Markus,

Try creating two hidden fields on your form. Change your query so it is
bound to the form's two hidden fields. Using the form's button OnClick
event, try using a couple inputboxes to set the value of both hidden fields
and to then open your query.

Todd
 
In the Command Button's OnClick Event procedure:

Dim strValue As Variant

varValue=InputBox(MyPrompt, MyTitle)
' Where MyPrompt and MyTitle are strings, e.g.,
' varValue = InputBox ("Enter value", "Mystery Value")

'If user presses Cancel, InputBox returns a blank string
If strValue<>"" Then
' Do additional error-checking here to verify the type of value received
' If it's to be a number, convert the returned string
' varValue = Val(varValue)
' Assign to textbox
Me![MyTextBox]=varValue
End If

Hope that helps.
Sprinks
 
Back
Top