Results 1 to 5 of 5
  1. #1
    Lupson2011 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    68

    Opening a Form based on an unbound combo box value

    Hi all



    I have a form with two unbound combo boxes with VBA coding behind. One is for the Adviser Name, the Other is for the SCIID (ref no)

    When you go into the form and choose the Adviser Name, only those assignments assigned to that Adviser will be available to choose in the second combo box. if you choose any of these assignments, then certain information appears in a list box below.

    This all works fine and well.

    What I need to do now is to have the facillity to input expenses claims against any particular assignment. Meaning, I want to have a button which when clicked,opens another form based on what SCIID has been chosen in the second combo box.

    FOr example, I choose Joe Bloggs in the first combo box. By choosing him, 3 assignments are available to choose in the second combo box SCI0001, SCI0002, SCI0003. I choose SCI0002, and in the list box, the details of that project appear.

    Now, I have an expenses claim from Joe Bloggs which I was to input onto the system, so I click on my 'Open Claim Form' button, which takes me to another form, for SCI0002, in which I can input the information

    I need the expense claim input form to be always linked to the value that is in the second combo box. This is something that is easy if the field is bound, but I seem to be having difficulty with it being unbound


    I hope that makes sense..Any code help?

    Marc

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596

  3. #3
    Lupson2011 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    68
    THankyou, sorted it. I needed the text line with the quotes

    Quote Originally Posted by Robeen View Post

  4. #4
    Lupson2011 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    68
    Hi again..sorry, this has hit a malfunction in respect that it opens the form ok, but the two field i have in the filtered records AdviserName and SCIID do not carry through the values from the other form. So going back to my example, Joe Bloggs and SCI0002 do not get captured in the fileds or table which in the record source of the form

    ALso, to add to this, even when it did work and it pulled through the AdviserName and SCIID values, it didnt tie into the expenses claim table recordset


    Any mroe ideas?


    Quote Originally Posted by Robeen View Post
    Last edited by Lupson2011; 06-28-2012 at 06:25 AM.

  5. #5
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I need the expense claim input form to be always linked to the value that is in the second combo box. This is something that is easy if the field is bound, but I seem to be having difficulty with it being unbound
    1. When you enter the expense claim form - you are creating a NEW record on the Form - to put INTO the expense claim table - right?

    2. So - what you are really wanting is to pass the value from the 2nd combo box on the first form - and have that value PASTED into a Text Box on the expense claim form. Right?

    3. If you are using the expense claim form to input data into the expense claim table - why are the fields on this form not bound to the fields in that table?
    I mean, it's a data entry form - right? How are you getting the data into the expense claim table if the fields on the form are not bound to the table?

    Anyway . . . passing a value from a control [in your case, a combo box] on one form to a control on another form is also possible.

    The thing that I'm not sure I understand is when you say:
    need the expense claim input form to be always linked to the value that is in the second combo box
    "Linked" implies that the value already exists in both locations.
    But - in your scenario - I think you are trying to create a NEW record - USING the value from the combo box in the first form - NOT . . . 'LINK' it to a matching value in another record in the expense claim table.

    Can you clarify all this for me?

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

Similar Threads

  1. Replies: 8
    Last Post: 06-04-2012, 07:20 AM
  2. Replies: 15
    Last Post: 04-17-2012, 01:42 PM
  3. Unbound Combo Box to filter form
    By Firefighter22 in forum Forms
    Replies: 4
    Last Post: 08-31-2011, 03:39 PM
  4. Cancel opening a form based on information
    By eww in forum Programming
    Replies: 1
    Last Post: 10-19-2010, 01:24 PM
  5. Replies: 1
    Last Post: 03-26-2010, 10:32 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