Query to Form Question

  • Thread starter Thread starter Scott A
  • Start date Start date
S

Scott A

Here's what I've got:
I've build a Query by Form search interface, which
accepts parameters and generates a query. I have then
based a form on the fields returned by the query.

Now the Problem:
As is stands right now, the user can enter their
parameters in the QBF form, but when they run the form,
all they will see is the resulting table built by the
query. What I want is for them to see the form built on
the query, with the records filtered by the QBF form.

If they just opened the form, they will have to enter the
parameters without the QBF interface - which will mean
nothing to them.

In short - how to I jump from form to form, and still run
the query in between?

Thanks,

Scott
 
Might also be helpful to know that I built the QBF form
using a macro. I assume that in order to make the jump
from the QBF form to the filtered data entry forms, that
I will need to add some code to the QBF form's OnClick
event (?) - that's my best guess, but I'm a super-newbie!

Here's what I got as code after converting the Macro to a
Module:

---------------------
QBF_Macro

---------------------

Function QBF_Macro()
On Error GoTo GBF_Macro_Err

DoCmd.OpenQuery "QBF_Query", acNormal, acEdit

QBF_Macro_Exit:
Exit Function

QBF_Macro_Err:
MsgBox Error$
Resume QBF_Macro_Exit

End Function

I must admit that I don't really know what "acNormal"
and "acEdit" are - but I'm hoping I can modify that
statement to mean "please run the query, and then open X
form to return the records" (I'm hoping somebody out
there is working on a ''natural language' version of VBA -
if you are, we can talk! ;))
 
Back
Top