Getting dynamic parameter results in VBA

Jmsteph

Registered User.
Local time
Today, 07:18
Joined
Dec 2, 2008
Messages
28
I am using a form linked to a query to pull a specific policy. In the query I have set the criteria to be [what is the policy number?] to pull a specific policy.

What I am wondering is there a way to capture what was entered into [what is the policy number?] in VBA? I'd like to build some criteria using the form open function in access, but can't seem to pull this data.
Thanks,
 
Isn't it the other way around? Your query should get the parameter from the form. After a change in the parameter (i.e. in the AfterUpdate event of the textbox or combobox in question), you just requery the form.
 
You can get what was entered in the Load event of the form.
 
On the Load event of the form what would the paremeter equal so that it would pull the value in VB? I'd like to do different things with what they typed, but can't seem to locate its value. Ive made up an example of what I'd like to do below.

If Len(What they Typed) = 0 Then
Msgbox ("You entered" & Len(What they typed) & " digits. Policy numbers are 10 digits")
Exit Sub
End If
 
If you think about it, the user typed in something that filtered a field and that field will reflect what was typed. That is, if it was exact match.
 

Users who are viewing this thread

Back
Top Bottom