Change Report Data Source From Form

1

123

Thank You For Your help and answer:
Is There any way to change report Record Source from Command button in A
Form in Run Time
Thank You
 
T

Terry

If I understand you correctly:
You can base your report on a query where the query picks its criteria up
from fields in an open form.

EX:
In the criteria of the query you can enter something like:

Forms!Formname!Fieldname.value
This of couse would require that your form be open and would give a blank
result if the formfield is empty.

HTH
Terry
 
R

rbrandt

You might try attaching this to the buttons click event

Private Sub Command33_Click(
If Me.Dirty Then 'Save the record first
Me.Dirty = Fals
End I
Me.RecordSource = "tblP2
End Su

to change to table two. If you have multiple tables, try multiple buttons, each one identified as a different table.
 

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