Search results

  1. J

    Running SQL from vba

    Thanks all for replies... there are a few to sort thru. Another late night with the vba and I'll let you all know how I go. Again, cheers for the pointers - much appreciated :p
  2. J

    Running SQL from vba

    Hi Paul, I am familiar with you as you were kind enough to help solve a previous problem for me - thanks again :) What I am trying to do is set up a select statement that when you click a button runs a query to selects records from a stock table. This statement needs to have a 'where' clause...
  3. J

    Save a form field back to the table on update

    thanks for the response orna.... shall give it a try and see how I go :)
  4. J

    Running SQL from vba

    I want to run an SQL select statement from a general module, activate on a button click event. This is my code; 'parameter query to display stock items based on selected distributor Public Sub DoSQL() Dim SQL As String SQL = "SELECT tblStock.DistributorNo FROM tblStock WHERE...
  5. J

    Save a form field back to the table on update

    Hi there access gurus :) here's one for you that I am stuck on.... I have a invoice form with a 'Paid' checkbox. As soon as the checkbox is updated in the form I want this change to be reflected in the corresponding table so that I can then run a dlookup to see what the value of the form is...
  6. J

    How does the IsNull work??

    thanks forum buddies! between the alternate iif statement and the move the report I pulled it together. The code needed to go on the on_activate event to work as I am setting filter criteria from another form. But the feedback pointed me in exactly the right direction. much appreciated josie :)
  7. J

    How does the IsNull work??

    Um - can't seem to find the report on_format event. I've got on open, close, activate, deactive, no data, page & error. Am I going mad?? josie :confused:
  8. J

    How does the IsNull work??

    Hmmm.... that doesn't seem to want to work. I get the logic, if me.paid is null then make it false else make it whatever me.paid is. But now I am back to the original error of "Expression that has no value" I put the code you suggested as a replacement to the varPaid = IsNull(Me!Paid) line -...
  9. J

    How does the IsNull work??

    I am trying to capture the value of a checkbox on the current report. I am using the IsNull to try and get around a "Runtime error: 2427 You entered an expression that has no value" when I use the code; varPaid = Me!Paid I am assuming I get this error because sometimes the checkbox isn't...
  10. J

    Data Type Mismatch... HELP!!!

    Thanks to all for replies! Another problem sovled and another feature ticked off. What can I say.... u guys r great! josie :p
  11. J

    Data Type Mismatch... HELP!!!

    Okay, I think I get what you were saying with the quotes thing Paul. I have given it a bit of a run - will have to do some further testing. Thanks!! :D my many appreciatives josie :)
  12. J

    Data Type Mismatch... HELP!!!

    Hmm.... removed the in the DLookup - still same problem. I don't get it the message box for new stock level is returning the right value. Now all I want to do is put that new value in replace of the old value as stockOnHand in the stock table. Things should be so simple :~ josie
  13. J

    Data Type Mismatch... HELP!!!

    Okay, so now I'm confused... the dlookup isn't looking up the value of the serial no it is only using it for a comparison to lookup the current stock level. and nor the update - again it is only using it as a comparison. if I comment out the sql things work fine as far as I get the right results...
  14. J

    Data Type Mismatch... HELP!!!

    Can't see why I am getting a Error 3464: Data type mismatch in critical expression on the following code; Private Sub Quantity_AfterUpdate() Dim intStockCurrent As Integer Dim intStockSold As Integer Dim intStockNew As Integer intStockCurrent = Nz(DLookup("[StockOnHand]", "tblStock"...
  15. J

    Get Checkbox Value from table not associated with form

    Awesome! will pop that bit of code aside for a ron (latter on <grin>) for the moment coding frantically and going great guns now that I have dlookup working. gotta love this forum stuff - heaps more helpful than the uni one - just a bunch of students stumbling around in the dark. While I would...
  16. J

    Get Checkbox Value from table not associated with form

    No probably not my husband either! Although given the hours he seen me staring at the screen I'm sure he would understand. With any luck this has helped me progress things and he can have his wife back <grin> Another one for you - if your're in the mood.... I want to set a variable and...
  17. J

    Get Checkbox Value from table not associated with form

    Life Saver! Mr Larson, if you weren't all the way in Oregon, US - I kiss you!!!! Thankyou SOOO much - it worked!! I have trolled sites, tried db connection suggestions and couldn't get anything to work. Just when I was about to give up you have revived my enthusiasm. What can I say... U r a...
  18. J

    Get Checkbox Value from table not associated with form

    Checkbox Dlookup - still problems Ah, but you see here in is where the problem lies. As novice to vba I can't even figure out how to check what 'operation has been previously canceled'. Let alone get the dlookup variable give me a response in a message box. Previous operating canceled - I have...
  19. J

    Get Checkbox Value from table not associated with form

    Checkbox Replies I like cats :D The code is being executed from an On Current event. But your explaination was invaluable - thanks to those you gave me some feedback - so much appreciated. I like this forum stuff!! I will try suggestions and fingers crossed - else you could be hearing more...
  20. J

    Get Checkbox Value from table not associated with form

    okay here goes... my first post on a forum other than my uni site. I am building (trying to anyway) an access db. I have a invoice form that is based on a table (invoice table) and I have a checkbox field in another table (customer table) that I need to get into the invoice form so that I can do...
Back
Top Bottom