Prompt Query

Saledate is set to N in the tlLookup table, but the field definition is set to text
 
So in the lookup table, change the value N to T for the saledate, this might work.
 
ok
also Can I have 2 calculations run on the same field AfterUpdate: see code below
Private Sub TOTSITES_AfterUpdate()
Me!PPS = Nz(Me!Price, 0) / Nz(Me!TOTSITES, 0)
End Sub

I also need this:
Private Sub TOTSITES_AfterUpdate()
Me!GPS = Nz(Me!Gross, 0) / Nz(Me!TOTSITES, 0)
End Sub

Anotherwords can you do 2 caluclations in the same AfterUpdate
 
Sure, instead of what you posted just type this:

Private Sub TOTSITES_AfterUpdate()
Me!PPS = Nz(Me!Price, 0) / Nz(Me!TOTSITES, 0)
Me!GPS = Nz(Me!Gross, 0) / Nz(Me!TOTSITES, 0)
End Sub
 
Oh so i can do as many as i need if I need to.
Thaks

BTW I change the field in the tlLookup for salesdate to T and it still did not work.
 
Private Sub TOTSITES_AfterUpdate()
Me!PPS = Nz(Me!Price, 0) / Nz(Me!TOTSITES, 0)
Me!GPS = Nz(Me!Gross, 0) / Nz(Me!TOTSITES, 0)
End Sub

When TOTSITES is null, there would be an error of division by zero.

^
 
Last edited:
The date data in the table must be stored as dd/mm/yyyy for the search to work. I have changed the format of saledate on my app to text and the search still works fine so there must be an issue with the data in your table.
 

Users who are viewing this thread

Back
Top Bottom