conditional replace

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have an Access table that is linked to an external text file (customer
sends me this each week)

I then do a MakeTable Query to another database that is then published to
the web and used by a FrontPage DBWizard page.

One of the fields is 'Country' and not all records have any data in this
field (it is blank) but if they don't, the country is definately 'UK'.

Is there any way I can check to see that the field is blank and replace it
with 'UK' before I do the MakeTable Query?

Is there a way to automate this?

Keep it simple - I'm new to this...

Ta.

SGC
 
In the query, change the country field to

IIf([country] Is Null Or Trim([country]) = "", "UK", [country])
 
Hi,

Does this go in 'Critera:' ?

Told you I was new to this stuff.

Thanks

SGC

Ofer said:
In the query, change the country field to

IIf([country] Is Null Or Trim([country]) = "", "UK", [country])

--
\\// Live Long and Prosper \\//
BS"D


Steve Crowther said:
Hi,

I have an Access table that is linked to an external text file (customer
sends me this each week)

I then do a MakeTable Query to another database that is then published to
the web and used by a FrontPage DBWizard page.

One of the fields is 'Country' and not all records have any data in this
field (it is blank) but if they don't, the country is definately 'UK'.

Is there any way I can check to see that the field is blank and replace it
with 'UK' before I do the MakeTable Query?

Is there a way to automate this?

Keep it simple - I'm new to this...

Ta.

SGC
 
No, in the field part of the query, create a new field
--
\\// Live Long and Prosper \\//
BS"D


Steve Crowther said:
Hi,

Does this go in 'Critera:' ?

Told you I was new to this stuff.

Thanks

SGC

Ofer said:
In the query, change the country field to

IIf([country] Is Null Or Trim([country]) = "", "UK", [country])

--
\\// Live Long and Prosper \\//
BS"D


Steve Crowther said:
Hi,

I have an Access table that is linked to an external text file (customer
sends me this each week)

I then do a MakeTable Query to another database that is then published to
the web and used by a FrontPage DBWizard page.

One of the fields is 'Country' and not all records have any data in this
field (it is blank) but if they don't, the country is definately 'UK'.

Is there any way I can check to see that the field is blank and replace it
with 'UK' before I do the MakeTable Query?

Is there a way to automate this?

Keep it simple - I'm new to this...

Ta.

SGC
 
To be more specific, in the field where you want to store the country, rather
than
Country, put:
Cntry: Iif(Len(Trim(Nz([country],""))) = 0,"UK",[country])

Steve Crowther said:
Hi,

Does this go in 'Critera:' ?

Told you I was new to this stuff.

Thanks

SGC

Ofer said:
In the query, change the country field to

IIf([country] Is Null Or Trim([country]) = "", "UK", [country])

--
\\// Live Long and Prosper \\//
BS"D


Steve Crowther said:
Hi,

I have an Access table that is linked to an external text file (customer
sends me this each week)

I then do a MakeTable Query to another database that is then published to
the web and used by a FrontPage DBWizard page.

One of the fields is 'Country' and not all records have any data in this
field (it is blank) but if they don't, the country is definately 'UK'.

Is there any way I can check to see that the field is blank and replace it
with 'UK' before I do the MakeTable Query?

Is there a way to automate this?

Keep it simple - I'm new to this...

Ta.

SGC
 
Thanks for this, I got it now.

In the same database - the Name field is all in uppercase and way to change
this to Title Case (first letter of each word capital rest lowercase)?

SGC

Klatuu said:
To be more specific, in the field where you want to store the country, rather
than
Country, put:
Cntry: Iif(Len(Trim(Nz([country],""))) = 0,"UK",[country])

Steve Crowther said:
Hi,

Does this go in 'Critera:' ?

Told you I was new to this stuff.

Thanks

SGC

Ofer said:
In the query, change the country field to

IIf([country] Is Null Or Trim([country]) = "", "UK", [country])

--
\\// Live Long and Prosper \\//
BS"D


:

Hi,

I have an Access table that is linked to an external text file (customer
sends me this each week)

I then do a MakeTable Query to another database that is then published to
the web and used by a FrontPage DBWizard page.

One of the fields is 'Country' and not all records have any data in this
field (it is blank) but if they don't, the country is definately 'UK'.

Is there any way I can check to see that the field is blank and replace it
with 'UK' before I do the MakeTable Query?

Is there a way to automate this?

Keep it simple - I'm new to this...

Ta.

SGC
 
Yes, by using the StrConv function

NewFieldName: StrConv([FieldName],3)

--
\\// Live Long and Prosper \\//
BS"D


Steve Crowther said:
Thanks for this, I got it now.

In the same database - the Name field is all in uppercase and way to change
this to Title Case (first letter of each word capital rest lowercase)?

SGC

Klatuu said:
To be more specific, in the field where you want to store the country, rather
than
Country, put:
Cntry: Iif(Len(Trim(Nz([country],""))) = 0,"UK",[country])

Steve Crowther said:
Hi,

Does this go in 'Critera:' ?

Told you I was new to this stuff.

Thanks

SGC

:

In the query, change the country field to

IIf([country] Is Null Or Trim([country]) = "", "UK", [country])

--
\\// Live Long and Prosper \\//
BS"D


:

Hi,

I have an Access table that is linked to an external text file (customer
sends me this each week)

I then do a MakeTable Query to another database that is then published to
the web and used by a FrontPage DBWizard page.

One of the fields is 'Country' and not all records have any data in this
field (it is blank) but if they don't, the country is definately 'UK'.

Is there any way I can check to see that the field is blank and replace it
with 'UK' before I do the MakeTable Query?

Is there a way to automate this?

Keep it simple - I'm new to this...

Ta.

SGC
 
Back
Top