Multiple queries on one field ?

pookie62

Registered User.
Local time
Today, 12:32
Joined
Jan 16, 2005
Messages
47
Hi,
I got several queries which all can apply to the same field, I was testing with this:
Code:
Private Sub Provisie_BeforeUpdate(Cancel As Integer)
Dim Fee As Integer
If Me.VerzId = 1 Then
    DoCmd.OpenQuery "ProvBerekGelders"
   Me.Provisie = Fee
   End If
End Sub

But it's not exactly what it should be.
I want the fieldvalue filled with the calculated value from the query.
How do I do that ?

AND !

How to set it that depending on the Me.VerzId value a different query is read and thus filling the field Me.Provisie with a different value from different Query
 
use the query as the recordsource of a recordset, open the recordset and read the value.
 
Don't know what you mean.. sorry..
Was thinking in the CASE SELECT direction.. isn't that an option ?
If the piece of code I wrote is correct, which I think it isn't...
 

Users who are viewing this thread

Back
Top Bottom