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.
 
No, just the following: VB for applications, Microsoft access 12 object library, OLE automation, microsoft office 12 access database engine object
 
microsoft office 12 access database engine object
This is the DAO library for ac2k7.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
OK, that makes sense and got me further. I am now stuck with a syntax error and not seeing it. I working with faq on Running sums with query and have the following syntax, I am guessing my issue is with the spaces in the names again. used in my query "Search by Date" : RunSum: CDbl(RecRunSum("Search by Date","Log ID","[Log Id]","HoursTrained")) . I have tried various methods and when it does run and opens the report from the querry the Report doesn't show the current running sum. I used the Running Sum with the Form Faq and works well.
 
Howdy dhookom . . .
dhookom said:
[blue] ... why not just use the Running Sum property of the text box?[/blue]
The link I provided is info on doing just that.

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
referencing FAQ702-5248: that I used for the Form works with the exception if I make a change the running sum only changes for that current record and not any records after that, unless I move forward through each record manually. This was causing the issue I was having with the Reports. Is there a method to change the records after the current edited record for the running sum in the form.
 
sailinxtc . . .
From the FAQ:
faq702-5248 said:
[blue]Finally, [purple]to see updates on the fly[/purple], in the AfterUpdate event of the field to runsum copy/paste the following:
Code:
[blue]   DoEvents
   Me.Recalc[/blue]
[/blue]
Did you install the above code and did you put it in the proper control? ... [purple]its the field being summed[/purple], not the [blue]RunSum[/blue]

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Yes I have that and seems correct, The field that is summed "HoursTrained", if I change it, it updates the "TotalHrs" on the fly for that record, but If I have records 1-10, and go back and change the field that is summed for record 5, "HoursTrained", 6-10 don't have the correct "TotalHrs" until I manually go ahead to each record in form view. so when my query is called and opens the report, records 6-10 the "TotalHrs" is wrong. Wasn't sure if I had to also do a running sum on the query also or if I could work off what was being done on the form.
 
sailinxtc . . .

RumSum for forms is for [blue]forms only![/blue] Has nothing to do with query or reports. I checked back in the thread and in your post [blue]20 Feb 11 1:17[/blue] you say;
sailinxtc said:
[blue] I working with faq on Running sums with query and have the following syntax, I am guessing my issue is with the spaces in the names again. used in my query "Search by Date"[/blue]
You need to go back to [blue]Query RunSum[/blue]. I infact did see an error in your syntax:
Code:
[blue]RunSum: CDbl(RecRunSum("Search by Date","Log ID",[red][b]"[/b][/red][Log Id][red][b]"[/b][/red],"HoursTrained"))
should be
RunSum: CDbl(RecRunSum("Search by Date","Log ID",[Log Id],"HoursTrained"))[/blue]
The double quotes in [red]red[/red] need to be removed. Your sending the [blue]Log Id[/blue] value as a string [blue]"[Log Id]"[/blue]

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thank you, I had noticed it also after posting and got as far as #Error in the runsum field with the query and have not solved it yet.
 
sailinxtc . . .

Post the full query.

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
The Error is Run-time error '3061' to few parameters. expected 1

The Search by Date is called from a button where the user can input the date, if not date is entered it pulls up all records in the report. The like.... is on the criteria of the Date field. I have also tried the RunSum.. with subs around search by date and Log Id.

Like [Forms]![TTLOG]![Search by Date] & "*"

RunSum: CCur(RecRunSum("Search by Date","Log ID",[Log Id],"HoursTrained"))
 
What is the reason for using code rather than the running sum property of the control in the report?

If you really refuse to use the non-code solution then the least you should do is answer the question "Post the full query".

Also, most of the time, you must put []s around field names that contain spaces.

I don't understand why you would use "Like" as a criteria against a date value.

Duane
Hook'D on Access
MS Access MVP
 
when the code: Like [Forms]![TTLOG]![Search by Date] & "*" is removed it will work, am trying to narrow it down further
 
I have a textbox that the user can enter a date into __/__/____ also a button that calls a macro that calls the Search by Date query based on the date the user enters and opens a report. If no date is entered the query / report produces all records. I don't have any query code and beleive the downfall is using the macro method. I am open to any better methods
 
I Would use the non-code solution with the running sum control property but the issue I run into is if the user changes a record inbetween on the form it changes it on the fly but the records after that don't change on the form until each record is viewed. Therefor the report when viewed using the non-code solution shows the correct running sum up until the record after that was changed. Sorry I missed this response earlier to your question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top