Search results

  1. B

    Remove Date from a Record using SQL VBA

    Sorry vbaInet, I miss understood. it now looks like: With db .Execute "UPDATE tblSerialNumber " & _ "Set ModelID = " & mdi & ", PickupLocationID = " & pul & ", DeliveredByID = " & dbi & ", " & _ "PickupTime = #" & pkt & "#, PickupDate = #" & pud & "#, ArrivalDate =...
  2. B

    Remove Date from a Record using SQL VBA

    With db .Execute "UPDATE tblSerialNumber " & _ "Set ModelID = " & mdi & ", PickupLocationID = " & pul & ", DeliveredByID = " & dbi & ", " & _ "PickupTime = #" & pkt & "#, PickupDate = #" & pud & "#, ArrivalDate = #" & ald & "#, " & _ "ArrivalTime = #" &...
  3. B

    Remove Date from a Record using SQL VBA

    I tried dpd = Null dpt = Null and it said invalid use of Null. Would SQL look like this: DepartureDate = Null, DepartureTime = Null In SQL string
  4. B

    Remove Date from a Record using SQL VBA

    Empty string would be nice, but it is a date field in table.
  5. B

    Remove Date from a Record using SQL VBA

    Re: Remove Date rom a Record using SQL VBA Basically yes, If there is a date in that field I want the date removed and to be blank or Null as you put it.
  6. B

    Remove Date from a Record using SQL VBA

    I am trying to do an update query via vba sql . I have tried setting the variable to Null and to "" and throws an error, I am sure that this is an easy solution, but my brain is fried and tried searching see if anyone has had this issue. With db .Execute "UPDATE tblSerialNumber " & _...
  7. B

    error 3061 too few parameters, expected 5?

    Okay, thank you so much pbaldy.
  8. B

    error 3061 too few parameters, expected 5?

    okay, I kind of get what you ar elooking at. I have 5 number fields, 1 string and 2 date/time fields. So what am I doing wrong?
  9. B

    error 3061 too few parameters, expected 5?

    Here is the code: With db .Execute "INSERT INTO tblCurrentLocation (SerialNumberID, SiteLocationID, ZoneID, SectionID, RowID, BayID, clDate, clTime) " & _ "VALUES('" & ssn & "', sli, zid, sid, rid, bid, #" & cld & "#, #" & clt & "#)" End With...
  10. B

    Declaring from form to VBA

    Okay, found my issue with that error, god I forgot to set db = CurrentDb(). but now I get a new error, I knew I was going to get it because I know there is a trick to code for dates. Error: Syntax error in date in query expression '#dd#'
  11. B

    Declaring from form to VBA

    Okay I have done what you have said but now I am getting an error. Here is the code that gives me error: With db .Execute "INSERT INTO tblCurrentLocationID ( SerialNumberID, SiteLocationID, ZoneID, SectionID, " & _ "RowID, BayID, clDate, clTime)...
  12. B

    Declaring from form to VBA

    Thank you for the help. I greatly appreciate it.
  13. B

    Declaring from form to VBA

    I know this is a newbie question but: When I pass the information from a form to a function in VBA do I have to reformat dates and change the form information that should be numbers to numbers or is this something access will do on its own? all fields on the form are unbound fields, does the...
  14. B

    Dlookup with a Date

    Now I see how use Nz properly, thank you so much for the help!
  15. B

    Hello Access World Forum

    Welcome aboard Marine!
  16. B

    Dlookup with a Date

    Here it is, Be nice this is still in the build process, but any suggestion is greatlt appreciated. The code is on the form frmTruckPickup in the afterUpdate of SerialNumber. Sorry, I must not have enough posts, so I had to zip the file.
  17. B

    Dlookup with a Date

    I have searched and searched because I was afraid someone would say use the search button on the forum. I am trying to do a Dlookup on a date to see if there is one or not, it returns 12:00:00 AM when no date is present. here is my code: adate = Nz(DLookup("[ArrivalDate]", "tblSerialNumber"...
  18. B

    DLookup in VBA

    Awesome, you guys helped me with this issue as well. Search featured helped as intended!
  19. B

    DAO Diplay or populate Help

    Okay, so using a DAO is not needed? I was wondering, because I already had it set with strSQL, but I was looking for something quicker with response time. It lags on the form right there. There is FE and BE across a network with a lot of traffic. Just was looking for a way to speed the form up...
  20. B

    DAO Diplay or populate Help

    I have search the net and the forum and I can't come up with a solution. Who knows i maybe making this harder than it need be. What i am trying to do is diplay the data in listbox. I can get it to print in an Immediate window, but not in the list box: This will call the Function Private Sub...
Back
Top Bottom