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?
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?
BTW, when you provide the additional details, please also mention
which version of Access you use.
Thanks!
- Hammer
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 . . .) Learn Office 2007 | Zoom In:: Microsoft Access 2007: Intermediate. Planning and Designing a Database. Database Design Process Inserting Rows, Columns and Cells. Deleting Rows, Columns http://www.zoom-in.com/products/microsoft/Learn_Office_2007HOME |
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 Special Edition Using Microsoft Access 2002 // Discounted Books from :: RECOMMENDED MICROSOFT EXCEL TIPS. Filtering a Range into a List of Unique Records Inserting a picture (company logo) in the header in Microsoft Excel 2002 http://www.exceltip.com/book-078972510X.htmlHOME | microsoft.public.access NewsGroup Archive: by thread:: deleting Access records does not reduce overall file size Bekkilin (05-Nov-04 11: RE: #Deleted displayed in all cells when connecting to SQL Databas MDP http://microsoft.mailarchive.ca/public.access/2004-11/HOME |
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
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
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!
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
Thanks again for your help!
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
Where's The Advantage In Windows Genuine Advantage?
Stocks Bounce After S&P Joins Bear Market
|