Search results

  1. A

    Between Dates in Where Clause

    Thank you TJ Poorman!! Both worked great. I was doing "= Between" in my attempts. Cheers!!!!!!
  2. A

    Count incrementally each duplicate column value in Access Query

    Is this what you are looking for Rajeev? Open the form to see if this is the desired result( a sum of 2 fields in the same record). Attachment
  3. A

    Between Dates in Where Clause

    I have this code below which pulls a report based on the current date, I wanted to be able to pull the same report by entering between 2 dates as is done in a query using parameters. Thanks for any help. reworkWhere = "ReworkTech = '" & Me.txt_tech_by_date_techid & "' And ReworkTimeOut =...
  4. A

    AND in Where Condition

    Thanks Galaxiom and CJ_London! I can sleep soundly tonight. Cheers!!!
  5. A

    AND in Where Condition

    I got this code to run correctly, which pulls records where they are not junk(can be seen at end of where condition), the only issue is that the "AND" does not turn blue. Is this a problem? If Not IsNull(Me.txt_last_rec_id) Then 'DoCmd.SetWarnings = False SQLText = "INSERT INTO tbl_batt_id " &...
  6. A

    SQL Insert

    Ha, that was it. OMG 4 hours later. My boss and his naming....well I guess he's paying for it$$$. I will attempt to test it out and post if I find any errors but here is what got now that is working: ''''''''''''''''''''''''''''''''''''' 'SQL INSERT INTO tbl_batt_id...
  7. A

    SQL Insert

    OK, I did what you said and it highlighted the field [float]. I took it out and the query ran. I looked at the data type in the table and it is regular text. So I don't see what the issue could be with that field. Also, I noticed that [Date_Code] is a date format. Do I need to format it in SQL...
  8. A

    SQL Insert

    So I put the parenthesis back in on the Into section but still same error: INSERT INTO tbl_batt_id (record_num, bat_id, float, under_load, siemans, manufacture, date_code, barcode, status) SELECT 49655, bat_id , float, under_load, siemans, manufacture, Date_Code, barcode, Status FROM...
  9. A

    SQL Insert

    Took those out but same error. Could it be the fact there is an auto number? Here is what I have in the debug: INSERT INTO tbl_batt_id record_num, bat_id, float, under_load, siemans, manufacture, date_code, barcode, status SELECT 49654, bat_id , float, under_load, siemans, manufacture...
  10. A

    SQL Insert

    I made spaces but I am still getting the same error code. Is this what you meant? INSERT INTO tbl_batt_id (record_num, bat_id, float, under_load, siemans, manufacture, date_code, barcode, status) SELECT 49653, bat_id , float, under_load, siemans, manufacture, Date_Code, barcode, Status FROM...
  11. A

    SQL Insert

    Thanks again for the reply Paul. Here is what I have but I still get a run time 3134 error on syntax: SQLText = "INSERT INTO [tbl_batt_id] " & _ "(record_num,bat_id,float,under_load,siemans,manufacture,date_code,barcode,status) " & _ "SELECT " & Me.record_num & ", bat_id...
  12. A

    SQL Insert

    OK Paul, Here is my attempt to follow your advice(Of course the syntax is very wrong): SQL = "INSERT INTO [" & tbl_batt_id & "] " & _ "(record_num,bat_id,float,under_load,siemans,manufacture,date_code,barcode,status) " & _ "SELECT " & Me.record_num & ", " & bat_id & "," & float & "," &...
  13. A

    SQL Insert

    I think I have a cleaner way of explaining: 1. I would like to query based on my old record_num 2. I would then like to insert that whole set of records back into the same table 3. The only difference is the new set would have the new record_num which is on my current form I feel like this...
  14. A

    SQL Insert

    Thanks for the reply. I am a little confused here. Will this allow me to essentially duplicate a group of records based on the old record_num and insert them with the new record_num? Thanks again.
  15. A

    SQL Insert

    UPDATE: I was able to get the first and last [prikey]'s of the table[tbl_batt_id] using DMin/DMax based on the [record_num]. I was thinking now some kind of loop to insert the values from looping from the first to the last record. Still at a loss though, just thought I would update my method as...
  16. A

    SQL Insert

    I have a field [record_num] in a table [tbl_batt_id] that can have duplicate record numbers in the table any number of times as a forgien key of sorts. So I would have a group of say 4 records with this same[record_num] in them and would like to duplicate the records but with a new[record_num]...
  17. A

    Visible When Printing

    I am trying to make a label visible on a form during print if a field has "like a string". We use a form so that it prints 3 forms to one page (They are tags for units for repair). I can get the label to be visible in the form view but when I print, the label is visible on every record where it...
  18. A

    Syntax for Open Report with multiple criteria

    Used the debug and played with a bit and here is my final working code: Private Sub cmb_tech_daily_Click() Dim strWhere Dim reworkWhere Dim repairWhere Dim qcWhere reworkWhere = "ReworkTech = '" & Me.cmb_tech_daily & "' And Not IsNull(ReworkTimeOut)" repairWhere = "RepairTech = '" &...
  19. A

    Syntax for Open Report with multiple criteria

    Thanks for the reply. I made the changes but I still get error 13 on this line: strWhere = "' & reworkWhere & " Or " & repairWhere & " Or " & qcWhere & '" Any suggestions? Thanks again.
  20. A

    Syntax for Open Report with multiple criteria

    I am trying to use multiple criteria in the Where clause of OpenReport. What is the proper syntax? I know I am using the quotes wrong. Can someone please help? Here are 2 attempts at the same code. Which one is correct?: reworkWhere = "ReworkTech = " & Me.cmb_tech_daily And Not...
Back
Top Bottom