Google Answers Logo
View Question
 
Q: Microsoft Access - Inserting Cells/Records ( Answered 4 out of 5 stars,   0 Comments )
Question  
Subject: Microsoft Access - Inserting Cells/Records
Category: Computers > Software
Asked by: digitalpixman-ga
List Price: $25.00
Posted: 18 Apr 2006 11:49 PDT
Expires: 18 May 2006 11:49 PDT
Question ID: 720246
In Microsoft Access, I would like to be in a table view, select a
column, and add a value to each cell.  I cannot use find and replace
since the existing cell is NULL.  How do you do this?

Request for Question Clarification by hammer-ga on 18 Apr 2006 12:24 PDT
You can use an UPDATE query to set a value in each record where the
cell value is NULL. I can give you an exact query if you can be a bit
more specific.

- Hammer

BTW, how did the File Duplicator work out for you? Did the second
version run without DLL complaints?

Request for Question Clarification by hammer-ga on 18 Apr 2006 12:25 PDT
BTW, when you provide the additional details, please also mention
which version of Access you use.

Thanks!

- Hammer

Clarification of Question by digitalpixman-ga on 18 Apr 2006 19:49 PDT
Hi,

We use Access 2003.  After we had the dll problem we got (to be
honest) nervous and concerned about installing and testing software
developed over answers.google.com.  Anyway, we could use some help
with the UPDATE query.  Basically, we want to insert the value "1"
into the field "Image01" for any records in our database where the
field "SubjectType" equals "Group".  I also would like for you to tell
us how to "install" an update query into our database and what you
press to run it.

Thanks!

P.S.  I was not sure about the ethical choice about approving the
answer for the earlier question since we are not going to use it, but
I've gone ahead and approved it, because you did the work . . .(I was
wondering if there is a way for a non technical person like me to make
sure the application is OK . . .)

Request for Question Clarification by hammer-ga on 19 Apr 2006 05:10 PDT
DigitalPixman,

I'll try to get to your query sometime today.

Re the FileDuplicator, I provided the source code, so you (or a
programmer you trust) can see exactly what it does. The missing DLL
problem was simply that VB added a reference to something that the
final version did not need. It ran fine on several systems here and,
because I had not added the reference myself, I did not realize it was
there. The DLL does not exist on your version of the operating system,
so it complained. I simply removed the reference and recompiled the
program. I'm sorry you don't feel you can use it. DLL issues,
especially across operating systems, are a fact of development life.
For example, I installed a new version of Quickbooks a few weeks ago
and had DLL problems. The File Duplicator, because of your concerns,
specifically does not have an "install". It is just a single exe that
has everything it needs to run.

In the real world, I am a professional software developer, not a
student or a hobbyist. I do Google Answers because it is often a nice
break from the larger software projects.

Why don't you give it a try on a machine you feel to be "safe", such
as a non-critical laptop that is not connected to your network?

- Hammer
Answer  
Subject: Re: Microsoft Access - Inserting Cells/Records
Answered By: hammer-ga on 19 Apr 2006 06:13 PDT
Rated:4 out of 5 stars
 
DigitalPixman,

Here are step-by-step instructions for creating the query you need. I
have written the query in such a way that you canjust paste it in,
rather than trying to describe in words where on the screen you have
to click to build it yourself. Once you have pasted it in, you can
look at it in Design View to see what you do to build one of these
yourself using the Query Designer.

Please ask for clarification if you have any questions.

Note: Since an update query changes data, and you are new at this, it
is a good idea to make a backup of your database before running your
new query.

Instructions
-------------

1. Choose Queries from the Objects Bar on the left hand side of the
database window.

2. Double-click Create query in Design View.

3. A box will appear offering you a list of tables. Click Close.

4. There is a View dropdown button on the Toolbar all the way to the
left under the File Menu. If it does not already say SQL, choose SQL
from the dropdown. Click the button.

5. A Query window will appear. Paste the following Query into it.

UPDATE pixman SET pixman.Image01 = "1" WHERE [SubjectType]=[Group];

Note: In my sample, all three fields are text. If Image01 is a number
in your database, remove the double quotes around the 1.

6. You can now select Design View from the View dropdown button to see
how this query looks from the regular design view.

7. Click the Save button on the Toolbar to save the query and give it a name.

8. Close the Query designer. You should now see your new query in the
Database Window. To run it, double-click on it.

For reference, I have created a small mdb with a table with the three
fields you mention, a query called Update Image01 that runs your
query, and a query called Clear Image01 that resets the Image01 field
to blank. You can download it from
http://www.hammerdata.com/Google/update_query.mdb . It was built in
Access 2002, so it may give you a version warning when you open it in
2003. Go ahead and let it upgrade if it wants to.

Again, please ask for clarification if you have any questions.

- Hammer

Clarification of Answer by hammer-ga on 19 Apr 2006 06:16 PDT
DigitalPixman,

In the query I gave you in Step 5 above, change the two places where
it says "pixman" to the actual name of your table. If you are not sure
how to find out what that is, let me know.

- Hammer

Request for Answer Clarification by digitalpixman-ga on 19 Apr 2006 09:26 PDT
Looking Good!  Thanks for the great instructions.  I got it working
after I changed [Group] to "Group".  Anyway, there is one other thing
we would like to add to the query.  Can you change it so that the
condition is where Subject Type equals Group AND Image01 does not
contain any values?  In other words, the subject type says group and
Image01 does not contain anything in the field.

Thanks!

Clarification of Answer by hammer-ga on 19 Apr 2006 10:03 PDT
Oh, I misunderstood what you meant! I thought you wanted to update
records where the value in the SubjectType field equalled the value in
the Group field, as opposed to the literal value "Group". I'm glad you
got it working.

As to the change to the query, try this:

UPDATE pixman SET pixman.Image01 = "1" WHERE (((pixman.Image01) Is
Null Or (pixman.Image01)="") AND ((pixman.SubjectType)="Group"));

As before, replace any occurance of "pixman" with your actual table name.

- Hammer

Request for Answer Clarification by digitalpixman-ga on 19 Apr 2006 16:54 PDT
Thanks again for your help!

Clarification of Answer by hammer-ga on 19 Apr 2006 17:58 PDT
You're welcome. I see that you rated my answer lower than you normally
do. Was there something else you needed? If so, please let me know.

- Hammer
digitalpixman-ga rated this answer:4 out of 5 stars

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy