Hello
I am a novice to Access/VBA and this is driving me nuts. Any help would be appreciated.
I have to create a little application which can print postcards(4"X6" ) based on following options:
Customer Type
OrderNumber
LoggedDate
Location
There are three cmd buttons Print, Preview and Cancel.
I created one report which has general look and feel of postcard(exmple return address on left hand upper corner and To address in the middle)
I developed four queries based on 4 different options.
qry_CustomerTyp eOption
qry_OrderNumber Option
qryLoggedDtOpti on
qryLocationOpti on
When I assign one query to report's recordsource it works fine
My problem:
I want to change the recordsource of the report to the different queries as per the options selected. I don't know how to do it. I tried with the
Please help.
thanks
I am a novice to Access/VBA and this is driving me nuts. Any help would be appreciated.
I have to create a little application which can print postcards(4"X6" ) based on following options:
Customer Type
OrderNumber
LoggedDate
Location
There are three cmd buttons Print, Preview and Cancel.
I created one report which has general look and feel of postcard(exmple return address on left hand upper corner and To address in the middle)
I developed four queries based on 4 different options.
qry_CustomerTyp eOption
qry_OrderNumber Option
qryLoggedDtOpti on
qryLocationOpti on
When I assign one query to report's recordsource it works fine
My problem:
I want to change the recordsource of the report to the different queries as per the options selected. I don't know how to do it. I tried with the
Code:
Private Sub cmdPreview_Click() Select Case Me.Frame0.Value Case 1 DoCmd.OpenReport "rptPostCard", acViewPreview, "qry_CustomerTypeOption" Case 2 DoCmd.OpenReport "rptPostCard", acViewPreview, "qry_OrderNumberOption" End Select End Sub
thanks
Comment