Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem getting info from forms to tables! 1

Status
Not open for further replies.

alastair

Technical User
Dec 19, 2000
2
GB
Hi People,

I need help. I have a table with a field - 'commissionvalue'.
I have a form with an input box - 'commission value' which is worked out from the input of two other boxes. This is calculated by an expression that I created in the expression editor but I can't work out how to post the answer back into the table, into commissionvalue! Please help.
Many Thanks, Alastair.

 
Put the fomula in the Afterupdate event of one of the two, or even both of the other text boxes.
So when you key in a value and leave the box it will calculate the value. and stick it in the "commissionvalue"

Like so
-------------------
Private Sub Text1_AfterUpdate()
If Val(Text1) = 0 Or Val(Text2) = 0 Then
Exit Sub
Else
Me![commissionvalue] = Text1 * Text2
End If
End Sub
-------------------------

then have the "commissionvalue" text box bound to the table like normal.



DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
Hi Doug,
Thanks for your help mate. I got it working today to my great relief but as I'm sure you know once you get one thing sorted another rears its ugly head! I wish to create a button on a form which takes the info from that form and pastes it into a template document in Word. Is this possible? I'm not really sure where to start!
Al.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top