Best way to get user input in MS Access

Discussion in 'OT Technology' started by pimphat, Mar 25, 2005.

  1. pimphat

    pimphat hmmm

    Joined:
    Sep 18, 2002
    Messages:
    5,701
    Likes Received:
    0
    Location:
    Australia
    I want to have a way to add a record to my Access database. I'll be adding a selection and a date. I though it would be easiest to have a basic form popup and then you just select the item and enter a date and click ok.
    The issue arises in that I want to add a record of which account you are doing this for. I.e. there are 3 pieces of data to enter in the record:
    accountId
    itemNo
    dateEntered

    How can I pass the accountId that is active in one form to the new form when it's opened? Or is there a better way to do it. Once the accountId is in the new form I can just do a DoCmd.Runsql to insert all the info on screen.
     
  2. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    The first step of anything to do with databases is to design the tables properly. For example, in a sales database you would need:

    Customers:
    CustomerID
    LastName
    FirstName
    City
    State
    PhoneNumber

    States:
    State

    Orders:
    OrderID
    CustomerID
    PartID
    Quantity

    Parts:
    PartID
    PartDescription
    Cost

    You get the idea? Once the tables are setup, the data entry can be done with forms, but without all the fancy SQL statements being required. So let's see your table layout first.
     

Share This Page