Tab control Integrity

F

Frank Situmorang

Hello,

On the Tab Control, I have one tab for all transactions report below, and
the latter is for outstanding only, but the problem is if I directly click
for outstanding only, no report shown, although there is outstanding amount.
I should run first all transactions tab, then I run the the outsstanding tab
control, then it works.

What should I do, in order to eventhough I jump the 2nd tab, I still can
run the report.

Below is my VBA.

I appreciate if anyone can help me on this.

With many thanks,

Frank

Private Sub OpenReport1_Click()
On Error GoTo Err_OpenReport1_Click

Dim stDocName As String

stDocName = "Aging Supplier Details Grouping by Suppliers_Select"
DoCmd.OpenReport stDocName, acPreview

Exit_OpenReport1_Click:
Exit Sub

Err_OpenReport1_Click:
MsgBox Err.Description
Resume Exit_OpenReport1_Click

End Sub
Outstanding only:
Private Sub ToOpensupplierOSonly_Click()
On Error GoTo Err_ToOpensupplierOSonly_Click

Dim stDocName As String

stDocName = "Aging Supplier Details Grouping by Suppliers_Select_OSonly"
DoCmd.OpenReport stDocName, acPreview

Exit_ToOpensupplierOSonly_Click:
Exit Sub

Err_ToOpensupplierOSonly_Click:
MsgBox Err.Description
Resume Exit_ToOpensupplierOSonly_Click

End Sub
 
F

Frank Situmorang

Thanks ErezM, if fact I am wrong, the filter in my query refers to another
combo in other tabcontrol, I forgot to change it.

Thanks for your comments
 

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