email data of table

Hi dear,
I have one more little problem
Its sending message every hour but i want to send just one or two time.

thanks
 
Then you'd want a counter integer declared at module level (at the top of the form's module):

Code:
Private ReportsSent As Integer

When the form opens set it to zero:

Code:
Private Sub Form_Load()
    ReportsSent = 0
End Sub

On the timer events check the value of it, only run the report if it's less than 2 and if it does run the report increment it and turn off the timer otherwise:

Code:
Private Sub Form_Timer()
    If ReportsSent >= 2 Then
        Me.TimerInterval = 0 'Turns off the timer
    Else
        ReportsSent = ReportsSent + 1
        CheckOrderLevels "Laptops", "Laptop", "[quantity ordered]", "Laptops"
        'etc
        'etc
    End If
End Sub
 
thanks dear,
Its works Perfectly that I want
 
Hi ,

I have Form OrderLaptops and table laptops. I have fields in Laptops table like Description,Quantity,Location,Department,Part number etc....

and Description is a Primary Key so you cann't enter same data.

If I have Quantity(3) for Description(Dell),Location(Canada),Department(HR) and If I order to 2(Quantity) more Laptops of Dell(Description) in HR (department) of Canada(Location). so if i enter data in OrderLaptops form it should be automatically update data in table Laptops and there should be just one record like 5(quantity) and other fields are same.



So how can i do in access 2007?

Thank you very very much
 

Users who are viewing this thread

Back
Top Bottom