Multiplication against a yes/no box

G

Guest

I have 4 fields
Field A has a dollar amount
Field B has a Yes/No check
Field C has a Yes/No check
Field D will equal Field A * Field A or B depending on which one is checked

In the forumula I want B to represent 165.5 and Field A to represnt 138

Also, Field B/C may also be empty. so then Field E would just equal what
Field A is.
 
G

Guest

code like this should meet your needs,

If Me.FieldB = False and Me.FieldC = False Then
Me.FieldE=Me.FieldA.Value
ElseIf Me.FieldB = True Then
Me.FieldD=Me.FieldA.Value*165.5
ElseIf Me.FieldC = TrueThen
Me.FieldD=Me.FieldA.Value*138
End if

Daniel
 
G

Guest

This is working for me. Does it make a different it if is a subform that
pulls from a Quiery Form?
 
G

Guest

Sorry, I meant this does not work for me. Just to be a bit more clear, I
have a table, from that I have several quiery forms. Finally I have a form,
with a subform that has my quieries forms in it. Does that make a difference?

Thank You.
 

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

Top