Re: DoCmd.OpenReport

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi -

This sounds like what might happen if a partner name has an apostrophe in it,

e.g. Jake's Machine Shop.

As for the Partner_ID being asked for again, what is the record source for
the report? If it is a query, it sounds like the query has a parameter in it,
which is unnecessary because the Docmd.OpenReport.... filters the records.
Another possibility is that the report contains a sort field which is not in
the source query (typing error maybe?)

HTH

John



TechTutors wrote:
Dim ReportName

If Me.Action = 1 Then ReportName = "Rpt_ActivationBounty_Detail"
If Me.Action = 2 Then ReportName = "Rpt_RevenueShare_Detail"
If Me.Action = 3 Then ReportName = "Rpt_ClientSummary"
If Me.Action = 4 Then ReportName = "Rpt_CheckRequisition"
If Me.Action = 5 Then ReportName = "Rpt_ItemCodes_NONVAR_AUDIT"
If Me.Action = 6 Then ReportName = "Rpt_ItemCodes_VAR_AUDIT"

DoCmd.OpenReport ReportName, acViewPreview, , "Partner_ID=" & Me.Lkp

The client selects a Partner from a drop-down list... Then selects which
report they want to open for that Partner. They Hit GO! and an "enter
parameter" fields comes up asking them to type the Partner_ID... They type
it in and it works just fine...

... Except for a handful of partners... I recieve a Run-Time error 3075...
Syntax error (missing operator) in query expression
'(Partner_ID=SAIDPARTNER)'.

Any help would greatly be appreciated!

Thanks!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200711/1

.



Relevant Pages

  • DSUM
    ... I have created a report that gives me budget information from my tables. ... also created a query that displays records with Invoice ... So I would like the partner group in my report to match the ... Instead each partner displays the sum of all the Invoice Amounts $105800. ...
    (microsoft.public.access.reports)
  • Re: DoCmd.OpenReport
    ... the query that runs the report has a crieteria parameter ... the source query (typing error maybe?) ... The client selects a Partner from a drop-down list... ...
    (microsoft.public.access.formscoding)
  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • Re: Fields in Label dont give correct information
    ... You need to create a query based on tblRegEvent and tblRegPayment. ... -If your DCountis to count values in your report, ... half the time with very few errors (other than that label problem I had.) ... For example in the Room assignment on the report an idividual will be ...
    (microsoft.public.access.reports)
  • Re: Tips on domain aggregate replacements
    ... This already is a split db, but the users are 400 miles away from the server hosting the data:) They are all running the same copy of the FE locally on a single terminal server via TS/RDP sessions. ... It doesn't seem to have much impact on performance; the report takes just about as long to run if they are all logged in as it does when I am logged on testing it at night. ... I would do DSums from the controls on the report on the data returned by the query. ... The biggest offender is a certain report that needs to Sum a particular complex total for each of the next twelve months (the DSum in VBA was a sideline to this issue) and present these as items on each line of output. ...
    (microsoft.public.access.modulesdaovba)