update query

H

hawaiitowman

I tried to use update query to update data that I didn't have prior to
inputting the rest. I get the data whenever my supervisor can give it
to me which is hours worked. I made a query with the criteria as null
hours. When I change the query to update query the date and employee
id fields ( which is part of the original query field) disappeared. It
only left the worked hours field which I can't update because the date
and employee id field disappears so I don't know who's hours or what
date I am updating.
 
J

Jeanette Cunningham

Hi,
it's always a good idea to have a backup of your data. You could make a
backup on close each time you have added new data or edited the data.
While you are experimenting with update queries, it is always good practice
to make a copy of the main data table before you use an action query
(update, append, delete) on it.

Another idea which would help save you from this sort of grief, is to work
out exactly how to do these queries to update the data and put them in code
on a form and use the form to do all your data changes.

Jeanette Cunningham
 
J

John W. Vinson

I tried to use update query to update data that I didn't have prior to
inputting the rest. I get the data whenever my supervisor can give it
to me which is hours worked. I made a query with the criteria as null
hours. When I change the query to update query the date and employee
id fields ( which is part of the original query field) disappeared. It
only left the worked hours field which I can't update because the date
and employee id field disappears so I don't know who's hours or what
date I am updating.

Perhaps you could open the query in SQL view and post it here. It would also
help to indicate what fields there are in your table, and how you're
determining which record should be updated.

If the criterion is JUST that the hours are NULL, you'll be updating every
record in the table with null hours, no matter what the date and the employee
ID might be, unless you're somehow indicating which employee and date you
mean!

John W. Vinson [MVP]
 
H

hawaiitowman

Perhaps you could open thequeryin SQL view and post it here. It would also
help to indicate what fields there are in your table, and how you're
determining which record should be updated.

If the criterion is JUST that the hours are NULL, you'll be updating every
record in the table with null hours, no matter what the date and the employee
ID might be, unless you're somehow indicating which employee and date you
mean!

             John W. Vinson [MVP]

Updating the table with null hours is what I need to update but
without knowing who's hours and the dates it makes it impossible to
update.
 
J

John W. Vinson

Updating the table with null hours is what I need to update but
without knowing who's hours and the dates it makes it impossible to
update.

Well... exactly.

If you had the information on a stack of paper timecards with no name and no
dates on the timecards, how would you update it?

I guess I don't understand the question. How can Access (or any program)
update records when you have no idea which records you want to update!?

It sounds like I'm misinterpreting the situation; could you describe it again?

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Trying to pull data from one table to another 4
update table using a Query 3
2 Relationship Query 1
Need Help... 5
Date overlap***UP*** 1
Time stamp 1
Run Update Query From Form 0
date overlap 12

Top