Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2014
    Posts
    3

    open form


    hi
    i have 2 forms , 1 have hotel information & other have cruise information, there is dropdown menu in a third form can allow me to choose either hotel name or cruise name
    after i choose i would like to be able to click at the hotel or cruise name so i can have the form with the hotel or the cruise information


    thanks allot
    i am new pls. help me

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Hotel and cruise info are in different tables? How do we know which item in combobox dropdown is hotel and which is cruise? How did you build the RowSource for combobox?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Nov 2014
    Posts
    3
    thanks your quick reply
    Hotel in a table & cruise in another , I made the drop down menu using the union qry so I can have all the names , type could be known from the name , as Radisson blu hotel & Sonesta nile cruise , I would like to know the following
    when I choose the name of cruise , system find the cruise form by name & get me the form with cruise information , When I choose hotel , system find the hotel & get me the form with the hotel information

    if its possible we can open the 2 forms & check by iff statement , so keep the right match open & close the other

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Still, how does Access know that Radisson is a hotel and not a cruise? How does it know Sonesta is a cruise and not a hotel? Need a column in the combobox with this info.

    SELECT ID AS CategoryID, HotelName AS EntityName, "hotel" AS Category FROM Hotels
    UN ION SELECT ID, CruiseName, "cruise" FROM Cruises;

    Then open appropriate form by referencing the combobox Category column index:

    DoCmd.OpenForm Me.combobox.Column(2), , "ID=" & Me.combobox

    This is just a simple example. I don't know your fields, tables, combobox, forms names.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 03-02-2014, 01:31 PM
  2. Replies: 2
    Last Post: 08-07-2013, 07:44 AM
  3. Replies: 10
    Last Post: 06-13-2012, 05:57 AM
  4. Replies: 1
    Last Post: 05-03-2012, 02:25 PM
  5. Replies: 2
    Last Post: 02-26-2010, 08:14 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