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!

Selectibg a particular record in a query

Status
Not open for further replies.

desikan

Technical User
Feb 2, 2001
105
AE
I have a form (Form1) with a subform (subform1) having text fields text1,text2,text3 etc.

When I open the form, I would like to choose a record and then via command button,start a append query that copies exactly this record to another table.

Now my problem is that the append query picks up more than 1 record though I have put the criteria in the append query field as Forms![Form1]![subform1]![text1]

I would like to add that there is nothing unique in the text fields text1,text2 etc which is actually causing this problem.

Any help will be greatly appreciated.
 
desikan

If you are duplicating an exact record from one table to another, then your database design is not normalised.
Generally there should only be one copy of anything, and fields in the table should be dependent on the primary key value within that table.
If there are multiple values with an identical value in a particular field, that is fine, provided that the primary key is different.
I would suggest using the primary key of the table to use as an identifier to copy the records across, as in certain circumstances there is a legitimate reason to duplicate data (normally keeping historical records where values that are calculated based on fields in it will change).

If you need more help on database design, please post back here and I will be pleased to help.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top