Search results

  1. B

    Date from DateTime field

    Hi, I have a field in a table that holds the Date/Time. I am trying to create a WHERE clause so that I can get all the records between two dates. This is what I currently have, but no luck: DoCmd.OpenReport "rptSummerReport", acViewPreview, , "SEASON = 'SUMMER' AND PATROLDTE BETWEEN #" &...
  2. B

    Control in Page Header

    Hi, I have a control in the Page Header that I need to change based on what shows up in the Detail section of the report. In the Detail_Format event I cannot seem to modify this control (a label) that sits in the Page Header. But....if I move the control into the Detail section, I can then...
  3. B

    Strange Report problem

    OK, So I have some VBA code that helps format my report. In the PageHeader I have a bunch of checkboxes, and depending on what is in the Detail section of my report determines what checkboxes are or aren't checked. When I run the Report in debug mode in the VBA editor, the report works fine...
  4. B

    SQL Error

    So if I rename the fieldname 'ACTION' the SQL statement in .NET will work. Not sure why, but that seems to do that trick.
  5. B

    SQL Error

    Hi, I'm using the following code in .NET to insert some data into a table. The connection is already open other commands are working. mySQL = "INSERT INTO tblWINTER_DETAILS (RECORDNUM, ITEMNUM, DETAILS, ACTION) VALUES (" + recNum + ", " + "1, " + "'This is a detail', " +...
  6. B

    CopyFile error

    Thanks Bob. I just assumed it would use the same filename. Is there another method I could use other than FileSystemObject.CopyFile that would automatically bring the filename over with it??
  7. B

    CopyFile error

    Hi, I'm using the following line of code to copy a file from one drive to another: fso.copyFile fileToCopy, "C:\Test" I keep getting a 'Run-time error 70: Permission denied' error. I have tried to manually copy and paste the files, and it works fine. I have full read/write access to both...
  8. B

    Problem Counting in report

    OK, I found a workaround for this. I put the totalCounter back into the Report_Detail event, but since that gives a higher count than there actually is, I subtract from the totalCount in the ReportFooter_Format event. See below. I still don't understand why I can't count in the Report_Print...
  9. B

    Problem Counting in report

    Hi, I have a report grouped by Municipality. Within each grouping I am counting the # of records in the group, as well as keeping a count for the total # of records in the report. I do my counting in the Detail_Print event (see code below). When I had this code in the Detail_Format event, I...
  10. B

    Access a reports record source

    I found an alternate solution. See: http://www.access-programmers.co.uk/forums/showthread.php?t=165336
  11. B

    Messed up Sort

    Hi Boyd, Thanks for your help. Didn't totally solve the problem though. I did change the report to source from just the table, but what actually solved it was to add two sorting levels: 1. StreetName; GroupOn 1st Character; Ascending 2. StreetName; GroupOn Entire Field; Ascending Now...
  12. B

    Access a reports record source

    Hi, I have a report that is based on a query. What I want to do is read the next record in the query before the report has a chance to write the record in the detail section. This way I can insert a page break (pagebreak.visible = true) depending on what the next record is. How do I access...
  13. B

    Messed up Sort

    Hi, I am creating a report based on a query that sorts my data (street names) alphabetically. As I want to start each new starting letter on a new page I am using the 'Sorting and Grouping' to specify: StreetName: Ascending GroupHeader: Yes GroupFooter: No GourpOn: Prefix Characters...
  14. B

    Run Time error: 3020 when editing recordSet

    Hmmm....interesting. It works now after I move the rs.edit into the loop. I don't understand why, but I guess that is just part of VBA. Thanks for the tip!!
  15. B

    Run Time error: 3020 when editing recordSet

    Hi, I get an 'Update or CancelUpdate without AddNew or Edit' error when running the following code. (the error happens where I have placed the **) The query has two fields: Phone and Fax, and in the table they are the proper format/length for this to work. When i do a debug and hover over...
  16. B

    Weird Calendar Control problem

    Hi, I'm using the Microsoft Calendar Control 11 to populate a date field on a form. The date field has a format of "Medium". When I use the control, I select todays date and what gets populated is 30/12/1899. But...if I immediately go back to the Calendar control and select todays date, then...
  17. B

    Subform Reference

    Excellent! Thanks. This was driving me nuts. I never would have even guessed the .Form part. Works perfectly now.
  18. B

    Subform Reference

    Hi, I have a form (frmSWL) with a subform container on it (subfrom1) which has a source object called frmSite. How do I reference frmSite from another form so I can apply a filter to it?? I am trying: forms!frmSWL!frmSite.Filter = "......." , but it is not working. Thanks,
  19. B

    Form keeps coming up maximized

    Try docmd.restore
  20. B

    Date format

    Wow....that seemed to work, but I have no idea why. If I use: format(me.lstDate, "MM/DD/YYYY") , then I can properly query my Date field which has a format of DD/MM/YYYY. That makes no sense to me, but it works. Thanks!
Back
Top Bottom