Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-Populate not working

Status
Not open for further replies.

1brainylack

Technical User
Aug 27, 2001
12
US
Please help! I have a form that uses a combobox to select the REBILL CUSTOMER. When a REBILL CUSTOMER is chosen, it does populate the text boxes with the customer info, address, city, state... However, when I go to other records with different REBILL CUSTOMERS, the populated text boxes remain the same as the last rebill customer that was chosen. I have the following as the AfterUpdate expression in the combo box:

Private Sub Rebill_Customer_AfterUpdate()

Me.AddressLine1 = Me.Rebill_Customer.Column(1)
Me.AddressLine2 = Me.Rebill_Customer.Column(2)
Me.AddressLine3 = Me.Rebill_Customer.Column(3)
Me.AddressLine4 = Me.Rebill_Customer.Column(4)

End Sub

Also, the text boxes are unbound, I'm guessing this is the problem, but not sure what to do to fix it.
 
Are you using a query to populate the form, If there is a one to many relationship set up between the tables you can set up the address on the query, so that when a person is chosen the address goes with that person.
 
Thanks, I think I understand. It was populating off of a table, so I changed it to populate from a query. However, when I try to edit fields, it says the form is read-only. Also, when i use the combobox, it says the record is not updateable. What did I do wrong!? Any help is GREATLY appreciated.
 
hi..

some idle suggestions from an apprentice guru...

Check your form's property sheet, data. Make sure records are "enabled" and not "locked". Make sure edits are permitted.

Don't name your controls with the names of the fields they represent.

Clear your combo box (Rebill_Customer = "").

Requery your combo box.

Best wishes :) Gus Brunston
An old PICKer
padregus@home.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top