User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 330,014 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,565 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser:
Views: 643 | Replies: 4
Reply
Join Date: Apr 2008
Posts: 3
Reputation: wallaby34 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wallaby34 wallaby34 is offline Offline
Newbie Poster

Query Design -- If -Then -Else?

  #1  
23 Days Ago
Still in a VERY steep learning curve with MS Access 2000 / 2003

Main Table has LastName - HomePhome - MobilePhone plus others of course
Some rows will have no entry in the HomePhone field but will have one in the MobilePhone field.
I am trying to set Query criteria to give me "If HomePhone is Null (no entry) then insert the data from the MobilePhone field into the HomePhone query result"
Have tried the IIf statements, but to no avail. Am fast losing what little hair I have left!
Please can anyone help ?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 2,210
Reputation: MidiMagic is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 75
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Posting Maven

Re: Query Design -- If -Then -Else?

  #2  
21 Days Ago
Try asking if the field equals "".
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 115
Reputation: buddylee17 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 21
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Junior Poster

Re: Query Design -- If -Then -Else?

  #3  
21 Days Ago
  1. UPDATE TABLE SET HomePhone=MobilePhone WHERE (HomePhone) IS NULL;
Last edited by buddylee17 : 20 Days Ago at 10:17 am.
Reply With Quote  
Join Date: Apr 2008
Posts: 3
Reputation: wallaby34 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wallaby34 wallaby34 is offline Offline
Newbie Poster

Re: Query Design -- If -Then -Else?

  #4  
19 Days Ago
Originally Posted by buddylee17 View Post
  1. UPDATE TABLE SET HomePhone=MobilePhone WHERE (HomePhone) IS NULL;


Thanks for the suggestion.
I guess my problem is the 10-12 years since I di much with Access, I have forgotten a lot (Not that I ever knew much !) and I am trying to keep my mind active

The following is what I have tried, with no success.

  1. SELECT Tbl_Members.LastName, Tbl_Members.FirstName, Tbl_Members.City, Tbl_Members.HomePhone, Tbl_Members.EmailAddress, Tbl_Members.MobilePhone
  2. FROM Tbl_Members
  3. WHERE (((Tbl_Members.EmailAddress)<>" " AND (HomePhone=MobilePhone WHERE (HomePhone) IS NULL)) ));

In which area have I gone wrong ??

Thanks
Last edited by peter_budo : 18 Days Ago at 7:30 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Join Date: Apr 2008
Posts: 3
Reputation: wallaby34 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wallaby34 wallaby34 is offline Offline
Newbie Poster

Re: Query Design -- If -Then -Else?

  #5  
15 Days Ago
Originally Posted by buddylee17 View Post
  1. UPDATE TABLE SET HomePhone=MobilePhone WHERE (HomePhone) IS NULL;


Thanks for the help, but I cannot, at this stage, get it to work. I will keep trying and will sometime get it going

Thanks again for the help
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum

All times are GMT -4. The time now is 10:17 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC