I have a form with a field, "existing Address", and within the main form, I have a subform, which looks up using a reference, an address, but this is in 4 different fields, ie., address 1, address 2 etc.
What I need to do is:
When a user chooses existing from a field called NeworExisting, it autopopulates the field, existing address with the data from the subform, fields, address 1, address 2 etc.
Can any one help?
It seems to be a straight forward copy and past question, but as a novice, I am struggling!
Now make sure you enter the ' after the = sign and before the closing )
Also the format of Address1 & ", " & Address2 & ", " & Address3 & "')
depends on how all the address info is stored in the other table you are looking it up from, for example:
If stored as: 123 Main St, Columbia, SC 29203
If the comma is not stored in the Address1 field you must type code as I stated above, but if you just store as: 123 Main St Columbia SC 29203
Then don't type the comma but you will still have to use the " " (space)
Hope this helps. If not post some of the code so we can "see" what you have and how you are trying it now.
I think you need to change that contract number expression. What that code does is gets a contract_no from a table called regional_download where that table's contractno (spelled differently than the fetched contract_no) is the same as the form's site_address_line_1 and a comma and the form's site_address_line_2 and gets the fetched contractno and sticks it in a field called FieldtoPopulate.
That doesn't seem to logical to me; have a go at getting it closer to what you need?
I also think jkevin has kinda sent you astray a touch by using the term "key field" which I think he meant "the relevant field".
What really makes this hard is not being able to see your structure or know what is on your form.