Auto updating fields

gls

Want to be guru
Local time
Tomorrow, 05:53
Joined
Mar 5, 2008
Messages
40
Hi, my first post and I hope someone can assist. I have one combox on my form. When I select a property identification number, I would like the following text boxes on the form to update auto as a result of the property identification being selected. So I need the unit Number, street number, suburb etc to auto populate in the text boxes that link to the property ref selected in the drop down box. Hope I have explained correctly and you understand.

Garry
 
Create a query whereby the identification number is your first column and then put your additional information after it.

Bind the query as the combobox's RowSource, and ensure that the relevant number of columns is entered in the ColumnCount property, and that the ColumnWidth is entered like 2;0;0;0;0;0, with each zero denoting a hidden column in your combo.

Then, on textboxes on your form, put the following in their ControlSource property:

Code:
=[MyCombo].[Column](1)

Where MyCombo is the name of your combobox and the number refers to which column you want to reference, bearing in mind that the first column (identification number) is column zero.
 
It worked

Thankyou for providing this info. Worked just fine.

Garry
 
Data not appearing in table from form

Hi

When I tested the DB, I have an error message, see attached doc. Basically the message is saying that the Property Reference field cannot contain null value, as the field requires data. I have used the property ID as the drop down box and the remaining property fields auto update from them. How do I get the auto populated data into the table off the form??

Help would be great.

Garry
 

Attachments

The Image within your attached document is obviously indicating (as you have said) that the Table Field Property_Reference can not contain a Null value. Due to its' property settings, something must be supplied before the record can be saved.

In the attached document image I can see that the Form contains a TextBox Captioned as Property Reference. Is this Form TextBox actually bound to the Table Field Property Reference within the tblAccess_Details Table?

When exactly does this Error come about? During or after what action?

.
 
DB error, sent DB

Hi

I sen the DB to your email address. Let me know if you can open it.

Garry
 
Ok Garry...I will check it out and get back to you.

.
 
check the underlying table properties - allow nulls should be set to yes

this should resolve the issue
 
Error

Hi, but the field must contain data so I can't set this to allow null.

Garry
 
Your Database is in the Mail...

Your Form Fields were not bound to Table.
The necessary Form Fields are now filled in with Combo column data via code.

.
 

Users who are viewing this thread

Back
Top Bottom