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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If statements in access

Status
Not open for further replies.

Ragol1

Programmer
Oct 25, 2001
315
US
can access2000 have if statements

ex: filed 1 is "pic: field 2 is "alt"

can I do anything like
IF PIC=nick.gif THEN alt=Nicks pic
IF PIC=tom.gif THEN alt=Toms Pic
 
Yes. You can have single line if statements in Access 2000 (don't know about earlier versions). Some consider it bad programming style. But your syntax is correct; there is no 'end if' needed if the then part of the statement is on the same line as the if.

If yours aren't working it's likely because you should have quotes around the values you're setting your fields equal to. -- Herb
 
I have never done it in access i use ASP

Where and what do I type for this to happen

What I typed was just a guess
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top