Hello there. I need your help.
I have created a meter reading database. In this DB, I have a meter reading form (frmMeterReading) which has the following data:
ReadingDate
ReadingID
SerialaNumber (foreign key)
Readings
I have a form for data entry (frmMeterReading) to the tblMeterReading. The ReadingDate is named as ReadingDateText and the serialNumber is named as serialCombo (since this is a combobox). In this form, I wanted the user to enter all data, save, and then print (open report that I have created). The data entry and saving part works ok, its the printing that I am having trouble with, it shows blank. Here is thr code I used for the printing. (Open Report)...
DoCmd.OpenReport "rptBilling", acViewPreview, , "ReadingDate like'c & Me.ReadingDateText & "*' And serialNumber like ' & Me.serialCombo & "*'"
I used the same code in another form, frmSearchBilling with the same parameters and it works. I think the problem is that in the frmMeterReading, the control source for the form is tblMeterReading whereas with the frmSearchBilling, the control source is a query I made with a select ststement. The rptBilling control source is a query I made.
How do I implement this with the current structure of my frmMeterReading with control source as tblMeterReading? Also, currently, I have separate save and print buttons, is it possible to use a single Save/Print button to do these 2 actions? I have tried but Iam having trouble with the Goto Next record new.
Thabks in advance!