Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

conditional replace

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Crowther - 27 Jan 2006 10:47 GMT
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
Ofer - 27 Jan 2006 11:51 GMT
In the query, change the country field to

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

Signature

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

> Hi,
>
[quoted text clipped - 17 lines]
>
> SGC
Steve Crowther - 27 Jan 2006 12:10 GMT
Hi,

Does this go in 'Critera:' ?

Told you I was new to this stuff.

Thanks

SGC

> In the query, change the country field to
>
[quoted text clipped - 21 lines]
> >
> > SGC
Ofer - 27 Jan 2006 12:46 GMT
No, in the field part of the query, create a new field
Signature

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

> Hi,
>
[quoted text clipped - 31 lines]
> > >
> > > SGC
Klatuu - 27 Jan 2006 14:55 GMT
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])

> Hi,
>
[quoted text clipped - 31 lines]
> > >
> > > SGC
Steve Crowther - 27 Jan 2006 18:31 GMT
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

> To be more specific, in the field where you want to store the country, rather
> than
[quoted text clipped - 36 lines]
> > > >
> > > > SGC
Ofer - 28 Jan 2006 18:20 GMT
Yes, by using the StrConv function

NewFieldName: StrConv([FieldName],3)

Signature

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

> Thanks for this, I got it now.
>
[quoted text clipped - 43 lines]
> > > > >
> > > > > SGC
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.