Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    Join Date
    Apr 2010
    Posts
    21

    Help With Purchase Order Form

    Hello AccessForums.net,



    I have a question as I am very new to Microsoft Access. How would I create an interactive form like this one below (I made the following picture on photoshop).

    I would need 2 drop down menus, one of them would be with suppliers and the other one would be for employee names. Not too hard to make in a database, I would just need to know how to make an interactive form like this and how would I call up the data in a different database (suppliers or employees).

    EDIT: It wouldn't be a random order #, it would be an order that would go up by 1 every time a new purchase order was filled out.



    Once I have made the interface and the purchase order, how would I go and make each new purchase order that is made have a unique number with a date in front? For example, 2010 0001. How would I have it so on each new purchase order, a new number would be made?

    Thanks for your assistance.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    This should get you started with the number:

    http://www.baldyweb.com/CustomAutonumber.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    Apr 2010
    Posts
    21
    Thank-you for your quick reply. I have been working with Access more and have somewhat gotten the hang of design view and the things that go along with that. I have another question, how would I add paragraphs to my combo box? I have a combo box with options under the "To" option, but I would need to have it so it would list something like this:

    55 Mulberry Lane
    City, Province. R1D 7L6
    Tel. (555) 555-5555
    Fax. (555) 555-5555
    Email: name@name.com

    I would need to have paragraph formatting, rather than just one line of information. How would I also go and have my combo box select a name, then bring up multiple fields from a database, but each field would be on a new paragraph.

    For example, I list Apple as a supplier. Then it would bring up Address, Phone number, fax number, and many other fields from a different database (for example, the supplier database), but have each field in a new paragraph.

    In my database, I would have:

    ID ....Name ....Phone ........Fax................. Address
    1..... Apple.... 555-5555 ....444-4444 ....... 55 Street

    Then I would select the supplier based on the name field, then it would list the Name, Phone, Fax, and Address fields in the combo box, but each one in its own category.

    If anyone could help me with that, I would love you long time

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You can try this type of thing:

    SELECT Address & Chr(13) & Chr(10) & Phone AS AllTogether
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Join Date
    Apr 2010
    Posts
    21
    Quote Originally Posted by pbaldy View Post
    You can try this type of thing:

    SELECT Address & Chr(13) & Chr(10) & Phone AS AllTogether
    How would I use those in access?

    Could I put under the "contact info" column something like:

    55 Mulberry Lane Chr(10) Phone: 555-5555 Chr(13) Fax: 555-5555 etc?

    EDIT: How would I also make buttons/labels that show up for my employees in form view but would not show up when printed?

    EDIT2: It would just be good to know how to add paragraphs to a cell in my table, therefore, I could have all of the formatting when I have my combo box option.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I think it would be a mistake to store the data in one field. It's always easier to join things together than to try to break them apart. I would only print a report, not a form. You have a lot more control over the look of a report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Join Date
    Apr 2010
    Posts
    21
    I need a form for the project that I am doing. Say I have the suppliers table with all of the information about a supplier. How could I make it so I would have a combo box, then after clicking the name of a supplier, it would fill for example 5 more boxes with information.

    Say, if you click the supplier "Bob's business". It would fill up one text box or label with the name, another one with address, etc. But all of that information would be on different columns on a table. So I would have a drop down menu with one option, and based on what you put in that one combo box, 5 more text boxes or labels would fill up with information.

    EDIT: I see with my textbox, it is going to use the Control Source command. So, I need an expression so when the Combo Box displays the ID, the text box will take the information from the table, then the ID, then from the column I specify. For example, if the ID was set to Test Supplier. The text box would take the text from the Suppliers Table, from the Test Supplier ID, then from the column that I specify. Could anyone set up an expression to do this? (where I would enter values, just put *value* or something like that). THANKS

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Me.TextboxName = Me.ComboName.Column(x)

    where x is the column containing the desired value.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    Join Date
    Apr 2010
    Posts
    21
    So, when I enter this under control source, it just fills the textbox with that text that I put in (and it adds [ & ] around it) and it gives me a #name? when I go to form view. Could you give me a guide or some steps for entering this? As I said, I am very new to this lol

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    That is VBA code, and was intended to be used in the after update event of the combo. If you want to use the control source, it would be:

    =ComboName.Column(x)

    but the textbox would not be bound to the table, which I though you wanted.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    Join Date
    Apr 2010
    Posts
    21
    I would like it to be bound to the table.

    So, would I just put Me.TextboxName = Me.ComboName.Column(x) in the Combo Box after update? Then, would I do code builder and put it between Private Sub and End Sub? If I am wrong yet again (most likely), could I just send you the project file and you could maybe adjust it for me briefly? Thanks so much for your help by the way

  12. #12
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You got it: code builder, put it between Private Sub... and End Sub. You would need to adjust the names to match yours and replace x with the appropriate column.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #13
    Join Date
    Apr 2010
    Posts
    21
    Thanks again for your replies, but I can't seem to get it working. I would need one text box for address, fax, phone, etc. (Multiple text boxes would have to fill based on the one combo box). Could you potentially have a look at it and set it up so the text box would fill with the column ID on the Suppliers table based on which ID is chosen via the combo box? I have uploaded the file, so if you would be alright with that, I can PM you with the download link and you could just re-upload a revised version with the changes made. I would be eternally grateful

  14. #14
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You should be able to post a compacted/zipped copy here.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  15. #15
    Join Date
    Apr 2010
    Posts
    21
    Here is a copy of the form: Under the logo, that is where the combo box would go and where the other fields would go. If you just set the combo box up to support 5 fields based on what was selected, I could create the text boxes.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access 2003, sort order property of a form
    By Rick West in forum Forms
    Replies: 11
    Last Post: 09-17-2009, 08:28 PM
  2. Chart Order
    By protean_being in forum Reports
    Replies: 0
    Last Post: 06-19-2008, 09:26 AM
  3. Replies: 0
    Last Post: 12-11-2006, 04:55 PM
  4. inport data into invoice from Purchase order database
    By Wrangler in forum Import/Export Data
    Replies: 2
    Last Post: 10-30-2006, 12:28 PM
  5. CallTicketID populated to Order Form
    By EisBlade in forum Forms
    Replies: 0
    Last Post: 04-03-2006, 10:50 AM

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