Open form when a new record is added

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have a table linked to the inbox of Outlook,this table is updated
automatically once i receive a new message as a new recoed is added
automatically,
Now i'd like to open a form called "Check" ,once a new record is added
to my table.
Can you help ?!!
 
Hi all,

I have a table linked to the inbox of Outlook,this table is updated
automatically once i receive a new message as a new recoed is added
automatically,
Now i'd like to open a form called "Check" ,once a new record is added
to my table.
Can you help ?!!

Tables don't have any usable events. I suspect you'll need to have
some VBA code in Outlook to do this, but not being versed in Outlook
event procedures, I don't know how that would be done. You might want
to post the question in an Outlook newsgroup.

The only alternative I can suggest is that you have a permanently open
form, and use its Timer event to periodically (every minute, or
whatever interval suits) to check to see if there is new data in the
table; you'll need to record the recordcount or some other indicator
to do so.

John W. Vinson[MVP]
 
Thank you John for your answer,
But i think i can do this Through Access:
Example : icreated a new txtbox on the main page and created an event
procedure (Ontimer event) as follows:
If [txtboxname] >1 then DoCmd.OpenForm "Check"
As the controlsource of the field [txtbox]=DCount"*","query1",as the query
"query1" contains only the unread messages.
But the problem is that i want to do an event that,if the number in the
[txtbox] is changed Then DoCmdOpen....
I hope i were clear
 
Thank you John for your answer,
But i think i can do this Through Access:
Example : icreated a new txtbox on the main page and created an event
procedure (Ontimer event) as follows:
If [txtboxname] >1 then DoCmd.OpenForm "Check"
As the controlsource of the field [txtbox]=DCount"*","query1",as the query
"query1" contains only the unread messages.
But the problem is that i want to do an event that,if the number in the
[txtbox] is changed Then DoCmdOpen....

The timer should do the job - the only addition is that you'll want to
Requery the textbox in the Timer event.

Actually, the textbox isn't needed: just open a REcordset based on
query1 and see if its Recordcount is zero:

Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb ' or you could have this open permanently
Set rs = db.OpenRecordset "query1", dbOpenDynaset
If rs.RecordCount > 0 Then
<open your form>
End If
rs.Close
Set rs = Nothing

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top