form and report help

B

bladelock

Good day all,

I have a command button on the form that will run a queue. The queue ask for
a "medrec" number that you type in. However, on the form the medrec number is
displayed on the screen Name=textbox316.

The question how can a make this command run with the queue by taking the
medrec on the form display?

Here is the queue:
On Error GoTo Err_Command703_Click

Dim stDocName As String

stDocName = "MedRec Matching"
DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_Command703_Click:
Exit Sub

Err_Command703_Click:
MsgBox Err.Description
Resume Exit_Command703_Click
 
D

Damon Heron

I think you mean query?? Open the query in design view and on the field
that requires the medrec number, put as criteria:
=[forms]![yourformname]![yourformfield]

Damon
 

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