Help Needed

  • Thread starter Thread starter jaykishan82
  • Start date Start date
J

jaykishan82

Dear Friend,
I created a Command Button, what i require is when i click on
that Command button
each time it run a temporary query and show me the output. Exa.Select *
from Tab;

I don't want to create any query.

Help me on this Topic.

Regards,
Jaykishan_82
 
Dear Friend,
I created a Command Button, what i require is when i click on
that Command button
each time it run a temporary query and show me the output. Exa.Select *
from Tab;

I don't want to create any query.

Help me on this Topic.

Regards,
Jaykishan_82

In the button click event code try this:

Dim SQL As String
SQL = "SELECT * FROM TAB;"
With CurrentDb
.CreateQueryDef "TEMP", SQL
DoCmd.OpenQuery "TEMP", , acReadOnly
.QueryDefs.Delete "TEMP"
End With

This does create a query, but it is immediately deleted.
 

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

Back
Top