Search results

  1. R

    Explain SQL UPDATE statement punctuation

    Thanks again!! That worked perfectly! Thanks again for all your help! :)
  2. R

    Explain SQL UPDATE statement punctuation

    aah, I see. You included the single quote around varName because it's a string but only double around cIDnum because it's not a string, probably an Int. Yes, that makes sense now and explains why other snippets of code never worked for me. Could I bother you with one more question? What is the...
  3. R

    Explain SQL UPDATE statement punctuation

    Single & Double quotes? I had been having trouble finding VB code to update records in a database. I found many different examples but the following is the only one I found that actually worked for me. Dim updateRec as String updateRec = "UPDATE dbo_HB_ITEMMASTER SET...
  4. R

    SQL error in Access query

    I do have permissions, I can create the view. It sounds like that's my most efficient solution. Thanks so much for your help!
  5. R

    SQL error in Access query

    I can do this as a SQL view and that is probably what my solution will end up being. I am trying to keep as much of the programming logic in Access as I can and keep my links minimal, that is why I did not just go with the view to begin with. I wanted to see if there was a better/more...
  6. R

    SQL error in Access query

    I thought the CAST function might be my problem. Yes, I am running this on a SQL table. I have it linked through an ODBC connection. I tried to run the query by creating new query (design), closing the show table window without picking any tables and then clicking on SQL View. I then pasted...
  7. R

    SQL error in Access query

    I need to determine the last transaction for an item. I have a transaction table that has a date column and a time column. Because I need the max date and then the max time within the max date, a single Access query did not work. I can do it with multiple queries but was trying to keep it to...
  8. R

    Prevent a blank or null value in a combo box on a form

    Thanks so much!!! That worked perfectly! Just had to add my missing "Cancel = -1" to keep the focus. I also changed my message box to OKCancel so the user can cancel and start over with a different item. Here's the full code that works perfectly for this situation for anyone else that might...
  9. R

    Prevent a blank or null value in a combo box on a form

    How to prevent a blank or null value in a combo box on a form? I have an unbound form that has a combo box (cboLotNum)with a OnNotInList event. The box gets populated from a lookup query if a record exists. Edits are allowed so the user can type a new lot number (if one doesn’t exist) or...
  10. R

    Set object values on form when new item entered in combo box

    I didn't get any errors, just clicked the button and nothing happened. When I went into debugging mode, I put a breakpoint at "If myMsg = 1 Then" line and when I stepped into it a Macros window opened up (something I've never seen before). That's all that would happen when I tried to step...
  11. R

    Set object values on form when new item entered in combo box

    Thanks, that makes sense. I think where I'm complicating this is that I don't want to just write back the item (which is the new value) to the look up table but also the new lot number and date. I guess I'm trying to use the same form for an Add, Change, or Delete record for the same table that...
  12. R

    Set object values on form when new item entered in combo box

    Thanks, that worked. The "Limit to List" property was set to No. I changed it to Yes and that fired the event. The only problem is I get an additional Access message complaining that the text I entered isn't an item in the list and to select an item from the list or enter text that matches...
  13. R

    Set object values on form when new item entered in combo box

    Using Access 2007. I have an unbound form with 3 objects, 1 combo box and two text boxes. The combo box uses a query as its row source. It grabs three columns from the query (Item, Lot#, and DateChanged). It has an “After Update” procedure that populates the two text boxes with the Lot# and...
  14. R

    hello

    Coming to you from the NorthEast US. Not new to Access but fairly new to Access programming with VB. Starting to create Access applications and hoping to find help getting over the obstacles of a newbie. Look forward to being a part of your Access community! :)
Back
Top Bottom