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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bound and Unbound textboxes? 1

Status
Not open for further replies.

NewfieSarah

Programmer
Feb 7, 2005
147
CA
hey all i was wondering, can a unbound text box be a bound textbox. I have just noticed that my unbound text box doesnt not save in the field in my table, that is because it is unbound right? but i need it to save to my table, and i guees the only way to do that is to save in in the save button right?
ok let me explain a bit more. I have a Visa purchasing table and form. However I know the total cost and once that is entered then the calculations for hst and net cost develope. I have that part working. Now I just need to save the hst and the net cost in the fields however those textboxes are unbound because of the calcualtions. Ideas? Thanks
 
Place Two Text Boxes on your Form
Bind one to hst
Bind the other to net
Set the visible property of these two text boxes to "False"

Private Sub BtnSave_Click()
me.hst = me.unboundhst
me.net = me.unboundnet
'unboundhst is the unbound hst field on your form
'unboundnet is the unbound net field on your form
'write code to save your record
End Sub
 
thanks for the reply back. however I dont see how this will solve my porblem?? to the unbound value goes into the one on the form correct?? then when i save then it will be saved??
 
Thanks a bunch it works great! I read between the lines! AWSOME!
 
Yes the unbound value goes into the one on the form correct.
Yes when you click on save then it will be saved.

If you want to save without click on save button
just place these code at some relevant event
me.hst = me.unboundhst
me.net = me.unboundnet

If you want solution in any other way let me know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top