Results 1 to 2 of 2
  1. #1
    rwmorehead is offline Novice
    Windows Vista Access 2003
    Join Date
    Jul 2009
    Posts
    1

    Populate a field in one form from combobox in another form

    I am looking for a quick way to enter data.



    I have three basic tables

    Master employee table: EEID (primary, Autonumber), employee number, name, date of hire

    Education table: EDID (primary, autonumber), type of education, date, notes

    Education look-up table: TypeID (primary, autonumber), name of education (i.e. CPR or Orientation)

    I have a form create for Master Employee Table, in which we can add new employees.

    I want to create a combobox with the look-up values from Education Look-up table. After selecting a class (i.e. CPR), hit a button that would open up a datasheet for the Education Table in which I can enter just the employee name and the date of the education. The type of education would automatically populate from the combobox selection.

    I have looked everywhere on the net and looked at many examples, but running into trouble in not finding the right code. Any help would be appreciated. I am somewhat of a novice, so any good code examples would be appreciated.

    Ron

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    You can do this on the OnOpen event of your Education datasheet form. Something like this:

    Private Sub Form_Open(Cancel As Integer)
    If Not IsNull(Forms!EducaitionFormName!EducationFieldName ) Then
    Me!TypeFieldName = Forms!EducaitionFormName!EducationFieldName
    End If
    End Sub

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

Similar Threads

  1. Replies: 0
    Last Post: 06-23-2009, 03:01 PM
  2. Replies: 7
    Last Post: 05-24-2009, 10:24 AM
  3. Replies: 2
    Last Post: 05-22-2009, 01:07 PM
  4. Auto populate fields on a form
    By ldarley in forum Forms
    Replies: 0
    Last Post: 08-14-2008, 09:39 AM
  5. In a field on a Form, on click open another form
    By jackieagra in forum Programming
    Replies: 1
    Last Post: 03-20-2008, 09:44 AM

Tags for this Thread

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