Report Not Returning Correct Form

highburycottage

New member
Local time
Today, 21:44
Joined
Aug 19, 2009
Messages
5
Hi,

Access 2002 SP3
Win XP SP3

I am in the process of creating a database for our Facilities Helpdesk at work. The majority of the database works fine. When the users log a call, they click an update button which updates the notes and generates a report which is emailed to the company in question. Each time the notes are updated, they click the update notes button and a new report is produced.

The problem I am having is that if they update the notes for call #1244, it produces the report, but any subsequent reports generated after that are still referencing call #1244.

The field for the call # is an autonumber, so I thought by putting in a Cstr() function it would help - but no.

Could somebody have a look at the following code and see if I have done something glaringly wrong - thanks in advance.

strWhere, strWas and strReport have been declared as strings.

strWhere = "[MBC Job No] = " & Me.[MBC Job No]
strWas = CStr(strWhere)
strReport = "TravelodgeUpdate"
DoCmd.OpenReport strReport, acViewPreview, , strWas
Reports(strReport).Visible = True

Note: MBC Job No is the autonumber field. I have the report to be visible at the moment so that they are not sent.

**** In addition: I have found that this function appears to be working correctly in Access, it only appears to not be working since I have uploaded the database to our SQL Server (more than one user accesses the database) and the linked database is causing the problems.

Thanks,

Paul
 

Users who are viewing this thread

Back
Top Bottom