Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

faq702-5248 Name Conflict with existing Module, Project or Object

Status
Not open for further replies.

sailinxtc

Technical User
Feb 13, 2011
23
US
faq702-5248 "Name Conflict with existing Module, Project or Object" Can you tell me why I get this error when enabling DAO 3.6 Object Library in Access 2007 under VBA, Tools, References.
 
sailinxtc . . .

Woops ... forget ignore my prior post!

We really need to see the SQL of Search by Date query.

[ol][li]Open [blue]Search by Date[/blue] in design view.[/li]
[li]Typically on the far left of the toolbar is the [blue]View[/blue] toolbar button. Click the down arrow to get a list of selections and select [blue]SQL[/blue].[/li]
[li]Copy, then paste the SQL into your next post.[/li][/ol]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
SELECT TTLOG.[Log ID], TTLOG.HoursTrained, TTLOG.TotalHrs, TTLOG.Date, CCur(RecRunSum("Search by Date","Log ID",[Log ID],"HoursTrained")) AS RunSum
FROM TTLOG
WHERE (((TTLOG.Date) Like [Forms]![TTLOG]![Search by Date] & "*"));
 
Change the SQL to
Code:
SELECT TTLOG.[Log ID], TTLOG.HoursTrained, TTLOG.TotalHrs, TTLOG.Date, 
CCur(RecRunSum("[Search by Date]","[Log ID]",[Log ID],
 "HoursTrained")) AS RunSum
FROM TTLOG
WHERE [Date] = [Forms]![TTLOG]![Search by Date] OR 
  [Forms]![TTLOG]![Search by Date] Is Null;
I don't understand what you mean by " Therefor the report when viewed using the non-code solution shows the correct running sum up until the record after that was changed." Are you experiencing issues with values in the report that are wrong because someone is editing these records while the report is being run?

Duane
Hook'D on Access
MS Access MVP
 
That produced the same errror: The Error is Run-time error '3061' to few parameters. expected 1 Field RunSum are #error. I saw another person with the same error and it was because the form was not declared. The "Therefor part" is: In my form and report each record has a TotalHrs that changes on each record based on the HoursTrained that the user inputs, running sum. the form or TotalHrs Changes on the fly if HoursTrained is changed but only for the current Record. So if I have records 1-10 and go back to record 5 and make a change to HoursTrained, the TotalHrs changes for the running sum, if I go to the next record the TotalHrs will then change, and so on for the next record. However if I view the report before each record is viewed the TotalHrs is wrong for any record that wasn't viewed in the Form. The RunSum for the report works with the exception of the sql when searching on the date from the textbox
 
By placing the following code in the Where Condition of the macro i was calling the "Search by Date" query I was able to find a work around: ((([TTLOG].[Date]) Like [Forms]![TTLOG]![Search By Date] & "*")) Thanks for all the help, I know I will never use spaces in things again.. still am not sure why it wouldn't work with prior methods...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top