Ramzess II
Registered User.
- Local time
- Today, 02:53
- Joined
- Apr 7, 2004
- Messages
- 32
Greetings!
Most likely it's simple one.
I have table with many different fields for parts of an address, like city, parish, street, region etc.
For each record some of those fields would be empty, others filled.
At the end what I need is to combine all those fields together into one, so making the full address, seperated with commas and if certain field is empty
nothing is displayed. So far it works in form, though it is wrong way to do it - I just added additional field to my table and in form I put in code like this:
Dim fulladdress As String
fulladdress = IIf(IsNull([street]), "", [street] & Chr(44) & Chr(32)) & IIf(IsNull([par_city]), "", [par_city])
Me.faddress.Value = fulladdress
so when I enter a new cient via form, the parts off address are combined and stored in the same table from where it goes to report.
Now I know it is wrong way to do and I decided that I need to reduce my table, so this full address line should be generated 'on the fly' in some unbound text field within report using the same way I did in form.
Somehow it does not work this time.
My form is built on table, same as the report.
Can anyone give me a solution?
Thank you in advance.
Most likely it's simple one.
I have table with many different fields for parts of an address, like city, parish, street, region etc.
For each record some of those fields would be empty, others filled.
At the end what I need is to combine all those fields together into one, so making the full address, seperated with commas and if certain field is empty
nothing is displayed. So far it works in form, though it is wrong way to do it - I just added additional field to my table and in form I put in code like this:
Dim fulladdress As String
fulladdress = IIf(IsNull([street]), "", [street] & Chr(44) & Chr(32)) & IIf(IsNull([par_city]), "", [par_city])
Me.faddress.Value = fulladdress
so when I enter a new cient via form, the parts off address are combined and stored in the same table from where it goes to report.
Now I know it is wrong way to do and I decided that I need to reduce my table, so this full address line should be generated 'on the fly' in some unbound text field within report using the same way I did in form.
Somehow it does not work this time.
My form is built on table, same as the report.
Can anyone give me a solution?
Thank you in advance.