Data Entry form - Report? (1 Viewer)

mounty76

Registered User.
Local time
Today, 07:32
Joined
Sep 14, 2017
Messages
341
Hi All,

Is there anyway to make a report based on a new record just entered into a data entry form?

FYI The data entry form also has a subform with the child table in

Cheers
 

Ranman256

Well-known member
Local time
Today, 10:32
Joined
Apr 9, 2015
Messages
4,337
the entry form would have a button to open the report.
The report query would look on the form for the record key , say: txtID
qry: select * from table where [id]=forms!fMyForm!txtID

then the report would open on the record currently shown:
docmd.OpenReport "rRpt",acViewPreview
 

mounty76

Registered User.
Local time
Today, 07:32
Joined
Sep 14, 2017
Messages
341
I tried this but it didn't work? Not sure why but was guessing it was because it was a data entry form?
 

bob fitz

AWF VIP
Local time
Today, 15:32
Joined
May 23, 2011
Messages
4,727
I tried this but it didn't work? Not sure why but was guessing it was because it was a data entry form?
Can't see why the solution offered wouldn't work.
Post a copy for us to look at.
 

bob fitz

AWF VIP
Local time
Today, 15:32
Joined
May 23, 2011
Messages
4,727
Perhaps the record needs to be saved before the report is opened.
EDIT:
Something like:
Code:
If Me.Dirty = True Then

     Me.Dirty = False

End If
before the line that opens the report.
 
Last edited:

mounty76

Registered User.
Local time
Today, 07:32
Joined
Sep 14, 2017
Messages
341
🤦‍♂️ my bad, sorry, totally rooky mistake....all good
 

Gasman

Enthusiastic Amateur
Local time
Today, 15:32
Joined
Sep 21, 2011
Messages
14,306
What did you do?
I was going to suggest switching data entry off and back on again.
 

Users who are viewing this thread

Top Bottom