I updating a report wiith the current record only

bkuuz1

Registered User.
Local time
Today, 16:15
Joined
Dec 10, 2008
Messages
15
Updating a report with the current record only

Hello, and thanks in advance, Not sure what setting I need to change but I only want my current record to be sent to my report from my table and not all the records. Any ideas. Thanks
 
Last edited:
You really haven't given much information as to exactly what you're trying to do here or how. You cannot send a current record from a table to a report. You can, however, do this from a form to a report, using a field that uniquely identifies the record in the Where clause of the OpenForm command. The syntax varies depending on the Datatype of the unique field:

For a unique Text field
Code:
DoCmd.OpenReport "YourReport", acViewNormal, , "[EmpID]= '" & Me.EmployeeID & "'"

For unique Numeric field
Code:
DoCmd.OpenReport "YourReport", acViewPreview, , "[EmpID]= Me.EmployeeID

If the record you're trying to print is a new record, remember to force a save
w of the record before using the code to send it to the report with code such as

Code:
If Me.Dirty Then Me.Dirty = False

.
 
So here is what I have going. I have a form that will be updated every twelve hours. As of now on my report it shows all records listed in order on the report. I only want the most current record to show on the report.

Example. Start of shift, person updates the info on the opening form and then closes the form and moves on to the next form. I only want this last record to be sent to the report.

I hope this explains what I need. Any help would be great. Thanks
 
You need to create a query to pull the last record added (hopefully you have a date/time stamp or something else that will identify the last record added) instead of using the table as the report's recordsource.
 

Users who are viewing this thread

Back
Top Bottom