Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blank field data insertion

Status
Not open for further replies.

teqtaq

Technical User
Nov 18, 2007
197
US
Please, help if you can!

Here is a table I am using on my Report.
Data looks like this:

Job Location Loc_CODE Description
111 AAA 2 FirstLocation
222 BBB 3 ThirdLocation
333 CCC 4

I have to have all fields on the Report.
So I was told to create a table where I would go

Loc_Code Description
4 ForthLocation
5 FifthLocation

Now all I need is to have my Report that Displays

TITLE

LOCATION
DESCRIPTION

Report DATA

to display 'ForthLocation' IF Loc_Code =4 (I have 5 orphan codes like that)

I am trying and nothing good comes my way in terms of ideas.
Thanks

P.S. When there is no Description - it is not NULL but " "
Loc_code is not always " "
So I thought of having some code like
If Description = " " and Loc_code =4 then txtDescription.value = 'ForthLocation'
or
If Description = " " and Loc_code =5 then txtDescription.value = 'FifthhLocation'

Thanks
 
I think I got the data correctly in a table.
Now all I am doin it trying to set txtbox data sorce to a If([f1]=" ",[f2],[f2]) but getting an errors
 
If is not a function, it's a logical operator. Do a help serch on IIf.

Sure, the early bird gets the worm, but the second mouse gets the cheese in the trap.
 
I have it perfectly fine
=IIf(([Office])=" ",[Description],[Office])
but it doesn't work.

Let say if Office and Description are the fields of the same table...
and Office is blank not null
then I want Description to be displayed.

Where am I making mistake here?
 
Apparently your tables aren't Access since an Access table would not normally allow storing a field value of a single space.

Duane MS Access MVP
Now help me support United Cerebral Palsy
 
Resolved with creation of series of Update queries...I even forgot those exists!@ Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top