Append to an existing record using two forms (1 Viewer)

Membercare1

New member
Local time
Today, 01:38
Joined
Sep 29, 2017
Messages
1
Hello forum !!
Am a relative novice Access user but do have a query on duplicate entries created through a form.

I have a Access 2016 database, one of the tables [Invoice] has the following fields…[ID] (primary key, [Invoice Number] (text field), [Receipt#] (text field)…and others with dates and amounts.

I use a form (Invoice Form) to update and generate an Invoice , all works well. I have another form (Tax Receipt) to generate an Receipt once invoice is paid. The Tax Receipt form has [Receipt#] and [Invoice Number] fields which I want to append to the record already created for a specific [Invoice Number].

At the moment, it creates a new record in the [Invoice] table if I punch in the existing [Invoice Number]. I just need to append to the existing record for [Invoice Number] and updating the [Receipt#], and date sent field.

See the last two rows in the Attachment as an illustration of the problem. The last row is the existing record...the one above is the new record created for the same Invoice Number

Sorry for the long winded story…any thoughts?
 

Attachments

  • Capture1.JPG
    Capture1.JPG
    61.3 KB · Views: 109
Last edited:

mike60smart

Registered User.
Local time
Today, 08:38
Joined
Aug 6, 2017
Messages
1,899
Hi

You would need to use an Update using something along these lines:-

CurrentDb.Execute "UPDATE [Your Table Name] SET Receipt# = Me.Receipt# _
& " WHERE Invoice Number= " & Me!Invoice Number ";", dbFailOnError

Point to note with field names. You should NOT have any spaces or use any special characters
 

Users who are viewing this thread

Top Bottom