Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LOCATING RECORD

Status
Not open for further replies.

desikan

Technical User
Feb 2, 2001
105
AE
I have a form which is opened through a macro whenever a fault is to be entered for a particular hardware.

Now due to security reasons, when the form is closed, an append query starts and appends the information on the form to a backup table.

My problem is that I am unable to identify the particular record which has been updated in the form due to which the append query updates several records instead of one only.

All the fields in the form have lot of duplicate information and hence I cannot put any specific criteria.

Grateful for any help.
 
Is the form default view set to continuous forms?

What is the SQL for the append query?
Could you possibly add a reference to the PK field on the form so that when it updates, it only updates the relevant field?

James Goodman MCSE, MCDBA
 
Well, thanks for your reply.

The default view is single form and I have the usual Docmd open macro statement on After update property and the macro in turn opens the append query.

I don't understand really what you mean by PK field?

Now I did a small short cut solution to above problem. I defined a new field as Reference no so that the data operator has to enter a new reference number manually whenever this form is used and now the append query points to this number and works ok.

But I think that what I have done does not seem to be a professional approach and a better dynamic solution may be possible.

Thanks in advance for any ideas!
 
what you could do desikan, is just record all of the information from the fields before the query runs, then when you run the query use an SQL string that reflects all that using ANDs, its kind of ugly, but without a unique key its probably your best chance. there will still be problems if 2 entries have the same values in the same fields.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top