Search results

  1. G

    Simple VBA program

    Sorry, I just got what you meant, haha. So I put AddToInventory in the OnClick event, but it gave me this error: Goods cannot find the object 'cmdAddToInventory'. Anyone else have any advice? Thanks for all the help.
  2. G

    Simple VBA program

    Ok, so I made a function that runs the Sub. I then put that function in a macro with RunCode. It obviously recognizes the function, but I get this error: "The function you entered can't be used in this expression". Any advice? Thanks again.
  3. G

    Simple VBA program

    Thanks for the quick replies- So what am I putting EXACTLY in the OnClick Event? Am I putting cmdAddToInventory_Click() ? Am I putting it with an equals sign or am I naming my button cmdAddToInventory? Thanks for the help.
  4. G

    Simple VBA program

    Thanks for the reply, but how would I put this into a button? I tried the OnClick event in the button with =AddToInventory(), made a macro that does RunCode AddToInventory, but no luck.
  5. G

    Simple VBA program

    I got the loop running, thanks. However, I still can't figure out why I can't run this code with a button? I am using Access 2010 if that helps. Now I am getting "The Function you entered can't be used in this expression."
  6. G

    Simple VBA program

    So basically I want a loop for the program, but is there any way I can make the program stop once I press cancel or X out of the program? The I variable was the only way I could implement an infinite loop. As for the button, I tried a lot of things. I made a macro that used RunCode and put...
  7. G

    Simple VBA program

    Thanks, this worked perfectly. However, I had a couple more questions if you don't mind. Whenever I try to close the box now, it always keeps popping up, AKA infinite loop. Any idea how this might work? Also, is there anyway to link this sub onto a command button in a form? Whenever I do it...
  8. G

    Simple VBA program

    Hello, I may be requesting a lot, but I have a problem. I have made a program that can identify a entry in a field (ID) and change the quantity of a field. However, if can only identify numbers. I have the code as follows: Option Compare Database Sub AddToInventory() Dim tb As DAO.Recordset Dim...
  9. G

    Basic VBA Question

    I found the problem, the ID2 column could only be numbers. Thanks.
  10. G

    Basic VBA Question

    Hello, I have an Access sheet that have three fields: InitialLevel, ID, and ID2. InitialLevel is changeable, ID is an autonumber, and ID2 is a changeable text field. I have a program that asks for ID and then locates it and adds one to the InitialLevel. Option Compare Database Sub...
  11. G

    A few questions about a Barcode Scanner program

    As for the barcode scanner, I figured out you can program the barcode scanner to enter the number and press enter in one button, as you said. However, what do you mean I should be able to return focus to the textbox? My program closes after entering a number and pressing enter. To run it again...
  12. G

    A few questions about a Barcode Scanner program

    Hello, I hope you guys can help me. I have a program that will take keyboard input and add/subtract a "quantity" field of a datasheet. The barcode scanner will input keyboard input. However, here's the problem. Once someone scans the item, I don't want them to press OK on the computer after...
  13. G

    New user needs help

    Holy crap, thank you so much! This worked perfectly. Don't want to be more annoying, but say you are in a warehouse and you want this to constantly be running (instead of clicking on the module each time you want to scan something), how would you do this? Could you have some loop that is...
  14. G

    New user needs help

    Hello, I am trying to implement an inventory. I want one simple task- create a program/macro to prompt user input for an ID, then it will add or subtract one from the quantity field of that object. I am trying to use a barcode scanner after this as well, but in the meantime I would like to...
Back
Top Bottom