Results 1 to 7 of 7
  1. #1
    rajgoyal00 is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Posts
    26

    Microsoft Access Relations Ships and Forms

    I am struggling to make this happen and cant seem to get anywhere. Hopefully Someone here can help me.

    I am creating a database for a retail store.

    - I have a table (Vendor List) that stores information about my vendors (Fields: ID (PrimaryKey), DataVal(DateVendor Added), Vendor Name(Text), Address(text), and so on).

    - I have a table (Purchases) to enter my purchases on a particular date for Vendors and the amount so (Fields: ID(Primary Key), DateVal(date), Vendor Name, Amount)

    What I want to do is create a form with a purchase date, (Combo Box) to choose a vendor from a drop down list (Vendor Name from table Vendor list) and enter an amount for the particular vendor and a description field for that purchase from that vendor. I want to have multiple entries for that date (as many vendors can supply on one day) on the same form.
    How is that possible. I am new to access and don't know much about setting up relationships. Any help will be appreciated. I can also be emailed at rajgoyal00@gmail.com.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I would start by naming your ID fields something useful like VendorID and PurchaseID. Then your Purchases table should have the VendorID rather than the VendorName. That is your 1:m relationship.

  3. #3
    rajgoyal00 is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Posts
    26
    Quote Originally Posted by RuralGuy View Post
    I would start by naming your ID fields something useful like VendorID and PurchaseID. Then your Purchases table should have the VendorID rather than the VendorName. That is your 1:m relationship.
    Thanks for your reply. I actually had done that. But the composition of the relation ship is still an issue. morely, when we are in a form we will using a vendor name rather than remembring the vendor no. (AGAIN SORRY, if my questions are sounding stupid) I started using access 3 days go and have spent over 20 hours on it. I have created many forms and tables, just got stuck with this one issue)
    Thank You for your reply

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Once you put that ForeignKey in the Purchases table the two tables can be joined in a query on that field and then all of the fields in both tables can be displayed as if they are in one table.

  5. #5
    rajgoyal00 is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Posts
    26
    So this is what I did. I didn't touch the ID (primary key) and made a field in each table vendor id. I set a relationship as you suggested. (Makes Sense).
    Then I went to create a query and I chose DateVal from purchase table(since thats the date we will be entering) and Vendors name from vendor list table, and amount and description from purchases table.

    Displayed query table with all the fields, but now when i want to enter in dateval it just beeps and does nothing, or any other field except vendor name. What is it that I am not doing rt or understanding. Thanks

  6. #6
    rajgoyal00 is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Posts
    26
    What I am trying to do is create a form use for vendor purchases.

    type in a date
    choose vendor name
    enter the amount
    and a desc

    choose another vendor name if there is
    and once I am done, close and save

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by rajgoyal00 View Post
    Displayed query table with all the fields, but now when i want to enter in dateval it just beeps and does nothing, or any other field except vendor name. What is it that I am not doing rt or understanding. Thanks
    This link may contain the answer to this question: http://allenbrowne.com/ser-61.html

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

Similar Threads

  1. Replies: 9
    Last Post: 11-22-2011, 05:23 PM
  2. Replies: 0
    Last Post: 10-13-2010, 03:28 PM
  3. Replies: 1
    Last Post: 06-20-2010, 05:04 AM
  4. Microsoft Access Forms
    By hajvery in forum Queries
    Replies: 1
    Last Post: 01-06-2010, 11:29 AM
  5. Microsoft access
    By rose rivera in forum Access
    Replies: 0
    Last Post: 08-28-2008, 05:51 PM

Tags for this Thread

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