Assigning data from a query to an Access form in VB

I

Ian Norris

In a VB module I have selected data into a query.
How do I assign that data to an open multi-record form so
that each record from my query appears as a new record in
my multi-record form.

Many thanks
Ian Norris
 
K

Kevin

Ian,

Something like this:

dim sqlSTR as string

sqlSTR = "Your Query String here;"

Forms![FormName]!.RecordSource=sqlSTR

You might have to requery the form after your done and it
will have to be active when you execute this code.

Hope that helps!

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top