Results 1 to 2 of 2
  1. #1
    MHernan1 is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    18

    Question Using a combo box to populate a specific column

    Hi all, I had a programing question.

    Here is an example of what i want to do using (I am just using fruit for clarity)

    So lets say i have a table with 4 columns, ApplesAmount OrangeAmount PearAmount and GrapefruitAmount. The information being entered is the number of fruits sold each day.
    Now i have a combo box (lets call it "FruitType") that references a separate table i use just for the list of fruit.

    What I want is to select the fruit from the combo box, enter the amount in a text field next to it (lets call it "FruitQTY"), hit a button and have the quantity populate in the column that corresponds to the combo box selection.

    I am thinking it would require some sort of IF statement, but I don't know the best way of doing that in Visual Basic.
    Using an excel example (I know the syntax is probably wrong, but it will give you an idea of what i think is needed) =IF("FruitType" = "Apple", ("AppleAmount" = "FruitQTY), 0)

    Any help would be appreciated, even some "if" or equivalent type examples of visual basic code would be great.

    thanks!

  2. #2
    MHernan1 is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    18
    Never mind, I figured it out (i am such an idiot lol)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 02-27-2012, 09:50 AM
  2. populate a column with unique ID
    By itm in forum Access
    Replies: 6
    Last Post: 11-22-2011, 12:40 PM
  3. import specific column from excel to access
    By eshtul in forum Import/Export Data
    Replies: 6
    Last Post: 11-11-2011, 09:54 AM
  4. Replies: 1
    Last Post: 11-11-2010, 11:00 AM
  5. Replies: 1
    Last Post: 09-02-2010, 03:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums