Results 1 to 4 of 4
  1. #1
    DCV0204 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    85

    populate unbound field


    I have a form named "File Request Form" containing an unbound text box named "Text19" and a form named "FileRequestedByForm" with a unbound combo box named "Staff". I am wanting staff to select their name on the "FileRequestedByForm" from the "Staff" combo box; when selected I would like the "File Request Form" to open with the "Text19" text box populated with the name selected from the "Staff" combo box.

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by DCV0204 View Post
    I have a form named "File Request Form" containing an unbound text box named "Text19" and a form named "FileRequestedByForm" with a unbound combo box named "Staff". I am wanting staff to select their name on the "FileRequestedByForm" from the "Staff" combo box; when selected I would like the "File Request Form" to open with the "Text19" text box populated with the name selected from the "Staff" combo box.
    Not quite sure what you want to happen. If I understand right:

    Form "FileRequestedByForm" is open. Select a name from the combo box "Staff".

    When the form "File Request Form" is opened, you want the staff name to be put in the text box "Text19"?
    (You don't have a unique EmpID or an autonumber to use as a PK?)

    How does form "File Request Form" get opened????

  3. #3
    DCV0204 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    85
    That is correct. I am wanting the staff combo box to populate the Text19 text box.
    This database is only being used to email the request form it does not contain any tables except the one that list the staff for the combo box.
    I created a macro that runs when the name is selected to open the second form "File Request Form".
    Does the text box have to be bound for this to work?

  4. #4
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by DCV0204 View Post
    That is correct. I am wanting the staff combo box to populate the Text19 text box.
    This database is only being used to email the request form it does not contain any tables except the one that list the staff for the combo box.
    I created a macro that runs when the name is selected to open the second form "File Request Form".
    Does the text box have to be bound for this to work?
    In the form "File Request Form", use the load event to get the name from the combo box in form "FileRequestedByForm"

    Try this:
    Code:
    Private Sub Form_Load()
    
       Me.Text19= Forms!FileRequestedByForm.Staff
    
    End Sub

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

Similar Threads

  1. Replies: 4
    Last Post: 01-30-2012, 08:32 AM
  2. Replies: 3
    Last Post: 10-03-2011, 02:33 PM
  3. Replies: 5
    Last Post: 06-22-2011, 08:47 PM
  4. Replies: 6
    Last Post: 12-01-2010, 06:52 PM
  5. Populate unbound listbox with VBA
    By usmcgrunt in forum Forms
    Replies: 1
    Last Post: 09-23-2010, 09:11 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