Docmd SendObject Problem (1 Viewer)

chrisjrice

Registered User.
Local time
Today, 17:46
Joined
Mar 26, 2002
Messages
37
I have created a logging application which has several forms. Form 1 is the form first displayed on entry and acts as a menu. The menu has several command buttons each one loads a different form.

One of the command buttons when clicked displays a form which allows the user to enter data onto the database. The form has a save icon which the user clicks on once they have finished. When this icon is clicked on it actions a DOCMD Sendobject which creates a confirmation e-mail which is sent to are users, the form is then closed and the user is returned to the menu.

The first time you add somthing to the database the DOCMD sndobject works fine and the user is returned to the main form. If you click on the add command button again and add a second record to the database and click on the save icon, the user is returned to the main menu but no e-mail is created. I have put this into debug and the DOCMD sendobject is being hit everytime, it just seems that after the first action it does not work anymore.

Can anyone help!!!
 

aziz rasul

Active member
Local time
Today, 17:46
Joined
Jun 26, 2000
Messages
1,935
This may not help, but is worth a try.

On the open event of your second form, place

Me.Refresh OR Me.Requery

You may also need to refresh\requery any controls on the form e.g. combo boxes.

and see if that cures the problem. I have come across this problem myself in the distant past, but can't quite remember how I solved the problem.
 

chrisjrice

Registered User.
Local time
Today, 17:46
Joined
Mar 26, 2002
Messages
37
Thanks

Thanks for your help, that worked a treat. I did not realise it was that simple!!

Many Thanks

Chris
 

Users who are viewing this thread

Top Bottom