none
Access 2010 Form Loses Auto Fill

    Question

  • I just installed Office 2010 , now access will not auto fill my form.  I looked at the event procedure and it looks ok, also the calendar that the form uses does not work.  My old was Office 2000 Pro.  Everything worked fine till I installed 2010. Do I have to remove 2010 to get things to work again or is there something I'm missing.

    Thanks for any Help

    Wednesday, October 27, 2010 12:26 AM

Answers

  • Hi,

    1. Try to create a new query on the table you want to get the data from.
    2. Then wrote an expression for this query to join the Lastname and Firstname fields as follows:

      - FullName: Trim(Tablename.Fieldname for surname) & " , " & Trim([Fieldname for forename])
    3. Then also included all the fields in the query that will be autofilling the Textboxes you have created on the form.
    4. Change the RecordSource on the form properties to use the new created query .
    5. For the full name as above, you may use a ComboBox and then set the properties for that ComboBox's control source to use the expression you created as above. Then set the following code for the AfterUpdate as follows :

      Private Sub (Your combo box name)_AfterUpdate()
      Dim rs As Object

      Set rs = Me.Recordset.Clone
      Dim Test As String
      Test = "[The name of the expresion to combine first and last name] = '" & Me![Your combo box name] & "'"
      rs.FindFirst Test
      If Not rs.EOF Then Me.Bookmark = rs.Bookmark
      End Sub
    6. Create all the nessecary TextBoxes you need and set each individual TextBox's control source properties to point to the corresponding field in the expression above.(This could be selected from the field names presented to you when you click on the dropdown menu for the source).


      Now when you select a fieldname, the rest of the textboxes automatically updates with the details.

      Hope that helps.
    • Marked as answer by Jennifer Zhan Thursday, November 04, 2010 6:43 AM
    Thursday, October 28, 2010 7:45 AM

All replies

  • Hi,

    1. Try to create a new query on the table you want to get the data from.
    2. Then wrote an expression for this query to join the Lastname and Firstname fields as follows:

      - FullName: Trim(Tablename.Fieldname for surname) & " , " & Trim([Fieldname for forename])
    3. Then also included all the fields in the query that will be autofilling the Textboxes you have created on the form.
    4. Change the RecordSource on the form properties to use the new created query .
    5. For the full name as above, you may use a ComboBox and then set the properties for that ComboBox's control source to use the expression you created as above. Then set the following code for the AfterUpdate as follows :

      Private Sub (Your combo box name)_AfterUpdate()
      Dim rs As Object

      Set rs = Me.Recordset.Clone
      Dim Test As String
      Test = "[The name of the expresion to combine first and last name] = '" & Me![Your combo box name] & "'"
      rs.FindFirst Test
      If Not rs.EOF Then Me.Bookmark = rs.Bookmark
      End Sub
    6. Create all the nessecary TextBoxes you need and set each individual TextBox's control source properties to point to the corresponding field in the expression above.(This could be selected from the field names presented to you when you click on the dropdown menu for the source).


      Now when you select a fieldname, the rest of the textboxes automatically updates with the details.

      Hope that helps.
    • Marked as answer by Jennifer Zhan Thursday, November 04, 2010 6:43 AM
    Thursday, October 28, 2010 7:45 AM
  • HI Jennifer

    Thanks for the reply.  Dumb me I didn't think of starting over with new form. This looks like it will work I have 17 text boxes to populate so it really needs auto fill after choosing which stock item to use.  It will be a couple of days before I can get it done, will let you know if it works


    Thanks again for your help.

     

    Thursday, October 28, 2010 11:07 AM