Recent content by DavidWE

  1. D

    Create CSV File from Query

    Bump I thought I would try again, only I won't try to create the csv file from a record set. Here is my stored query: PARAMETERS [Forms]![Scan].[txtScanDate] DateTime, [Forms]![Scan].[txtScanNo] Long; SELECT [BoxScans].[Barcode], [BoxScans].[ScanDate], [BoxScans].[ScanNo]...
  2. D

    SetFocus to Text Box Not Working

    I need to add to my above question. The txtBar_Change event is executed when a barcode of 20 characters is scanned. I do not have a problem with SetFocus when I type the barcode into the txtBar. It is only when scanning. I just noticed that the barcodes for the db I mentioned above that does...
  3. D

    SetFocus to Text Box Not Working

    I am using Access 2000 and read somewhere that my problem might be a quirk. I need to have the focus return to the textbox, txtBar, in the code below. The focus always goes to the next field in the tab order of the form. I've changed the tab order and it always goes to the next command button...
  4. D

    Create CSV File from Query

    Thanks James, That would probably work. I am already updating a table and could create a new one each time. I might do that if I don't find another way.
  5. D

    Create CSV File from Query

    I am attempting to create a CSV file from a stored query. I have already created a record set from the query to update a table and create an Excel file. Dim db As DAO.Database Dim rs As DAO.Recordset Dim qdf As DAO.QueryDef Set db = CurrentDb() Set qdf = db.QueryDefs("qryTotals")...
  6. D

    Convert Date and Time to a Whole Number

    I'll try a few things first and then post my final solution in case anyone else needs it. I'll attach the db if I don't get it working without errors. Thanks
  7. D

    Convert Date and Time to a Whole Number

    Thanks. I will try it again. It might be a few days.
  8. D

    Convert Date and Time to a Whole Number

    I already have the primary key set as an autonumber. I need to generate another number to link records together. Each of those records will have its own primary key in addition to the number the code generates. I was attempting to make the number meaningful with the date and time.
  9. D

    Convert Date and Time to a Whole Number

    I'm late responding. No, I don't think I was performing multiplication or addition. I haven't had a chance to look at it for about a week. I'll check again and see about the overflow.
  10. D

    Help With Error on Stored Query

    I didn't notice the extra parenthesis. Fixing that got rid of the syntax error. I just now realized that the ScanDate field was formatted as text instead of date in my table. Once I changed that my original query works without the added Format...\#mm\/dd\/yyyy\#") Thanks for your help, Bob...
  11. D

    Convert Date and Time to a Whole Number

    I got some overflows with the above even though I used a double. It is possible I made a mistake somewhere.
  12. D

    Help With Error on Stored Query

    Thanks, Bob I just tried: WHERE ([BoxScans].[ScanDate]=Format([Forms]![Scan].[txtScanDate], "\#mm\/dd\/yyyy\#") That causes the error "Syntax error(missing operation) in expression." The query now looks like: PARAMETERS [Forms]![Scan].[txtScanDate] DateTime; SELECT [BoxScans].[Barcode]...
  13. D

    Convert Date and Time to a Whole Number

    I did try Clng(Date()) but the number is not always unique since the user might do several saves on one date. I also tried Clng(Now()) and the number still was not always unique. I had to add seconds to make the number unique - Format(Now(),"mmddyyyyhhmmss").
  14. D

    Help With Error on Stored Query

    I am getting an error on a stored query that accepts parameters from a form. PARAMETERS [Forms]![Scan].[txtScanDate] DateTime, [Forms]![Scan].[txtScanNo] Integer; SELECT [BoxScans].[Barcode], [BoxScans].[ScanDate], [BoxScans].[ScanNo], Sum( [BoxScans].[Quantity]) AS Total FROM BoxScans WHERE...
  15. D

    Convert Date and Time to a Whole Number

    Thanks for all of the replies. I've tried several of the recommendations above and can use one of them or a variation. And yes, I do get an overflow if I'm not careful to round first and cast to an integer.
Back
Top Bottom