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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add attachment to an empty new record?

Status
Not open for further replies.

georgesOne

Technical User
Jul 2, 2004
176
JP
Dear All:
I have a form which is used by (at least) two users. The first user will add an attachment to an otherwise empty new record. Later the second user will add some comment in the fields based on the content of the attachment.
However, the attachment is not committed to the new, empty record - instead a related message appears. What can I do?
Thanks, georgesOne
 
I should add: it is a Hybrid database with Sharepoint. The message is that the attachment cannot be committed to the server and the row should be commited first, then the attachment addition can be retried.
Thanks, georgesOne
 
What can I do
How do you expect a second user may modify a non committed new record created by the first user ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PH,
yes, that is part of the problem...
What I tried:
I have added a textbox, which - during the Attachment_BeforeUpdate event - would say "Attachment has been added". That actually works locally, but not with the server.
With using the server, the first person should add something into one of the other fields, then go to an existing record - thus commit the new record - then go back to the (now not anymore) new record and add the attachment.
So what I would like to have is a VBA routine, which runs (simulates) the committment (without the user being aware) and then allows the attachment to be attached.
Any idea how to do?

Thanks, georgesOne
 
The problem is that with the attachment actiona MS form pops up, and I have no idea, how I can interact with it.

Best, georgesOne
 
VBA code to simulate the committment :
Me.Dirty = False

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PH,

thanks for your help. Unfortunately your suggestion did not work... the server would not commit.
However, I have created a somewhat unelegant workaround and it seems to do what I wanted.
No further help needed at this point - thanks again.

Until the next time..., georgesOne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top