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 ?

Recommended Answers

All 4 Replies

Try asking if the field equals "".

UPDATE Table SET HomePhone=MobilePhone WHERE (HomePhone) Is null;
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.

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

In which area have I gone wrong ??

Thanks

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.