Results 1 to 3 of 3
  1. #1
    Luchino is offline Novice
    Windows 10 Access 2013
    Join Date
    Dec 2015
    Posts
    11

    Smile Msgbox Input on Form Load

    Hi all,



    I have an order form, with fields "Date", "Type" and "Account".

    I would like that, upon opening the form, the user is prompted with a dialog/message box asking for the input for these three fields, which will then populate the new order form. I would also like that there be a drop-down box to choose the value of "Type", the options being: "Order", "Quotation" and "Invoice".
    How do I go about this? I already have this:

    Code:
    Dim myValue As Variant
    myValue = InputBox("Enter Date")
    Date.Value = myValue
    But I can only do this for one value at a time. How can I get one message box with all three fields, including the dropdown box for "Type"?

    Thanks in advance!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about creating another form that asks these questions and then when properly completed, pass then to your "Order Form" in the OpenArgs argument? With another form you can completely validate the input including using ComboBoxes for selections to eliminate typos.

  3. #3
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,445
    Date and Type are reserved words, using them as field names can cause errors difficult to resolve. Strongly recommend you change them to something more meaningful like orderdate, ordertype

    here is a link to reserved words https://support.office.com/en-us/art...7-da237c63eabe

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

Similar Threads

  1. Replies: 3
    Last Post: 12-11-2015, 12:59 PM
  2. Replies: 6
    Last Post: 10-27-2014, 08:05 PM
  3. Run DoCmd.RunSQL from MsgBox Input
    By CementCarver in forum Programming
    Replies: 8
    Last Post: 10-13-2013, 12:40 PM
  4. Replies: 5
    Last Post: 06-14-2013, 11:44 AM
  5. If no matches Reopen form after Msgbox
    By LoveLearning in forum Access
    Replies: 2
    Last Post: 07-18-2012, 06:08 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