can i do this without text boxes
ok this bit of code reads textbox and updates the database but can i do it with out the text boxes using the fields from database in stead
not sure if this should be here or in database section
cheers
Doug
Code:
Private Sub Form_Load()
With Adodc1.Recordset
Do Until Adodc1.Recordset.EOF
If Adodc1.Recordset!currant = "Yes" Then
txtTotal.Text = Format(Val(txtQuantity.Text) - (Date - CDate(txtFill.Text)) * Val(txtDose.Text), "00")
.Update
End If
.MoveNext
Loop
.MoveLast
End With
End Sub
Re: can i do this without text boxes
Where would the values come from (the ones that are now in txtQuantity and txtFill and txtDose)?
Re: can i do this without text boxes
they are in database fields quantity, dosage, fill date
cheers
just trying to make my prog simpler to use
Doug
Re: can i do this without text boxes
And what field is being updated with this?
Are you familiar with writing SQL queries? (In this case, an UPDATE query)
Re: can i do this without text boxes
field total in this instance
have not got any clue with sql
sorry
cheers
Doug
1 Attachment(s)
Re: can i do this without text boxes
this is how it looks at the moment
you fill in name quantity fill date and dosage then every thing else should update its self
if you see what i mean
cheers
Doug
Re: can i do this without text boxes
It's current not currant :D
Re: can i do this without text boxes
just a small mistake
hehehe
Doug