hi,
I got a problem and i need help.I m trying to get from a table the value of a record and compare it on the if statement for it to enable a textbox and the color
This is the code i m using
Dim dbsStock As DAO.Database
Dim rstMinimum As DAO.Recordset
Set dbsStock = CurrentDb
Set rstMinimum = dbsStock.OpenRecordset("minimum")
If Me.Texte15.Value < rstMinimum Then
Me.Texte15.Enabled = True
Me.Texte15.Text = "Red"
Me.Texte15.Value = vbRed
dbsStock.Close
rstMinimum.Close
End If
me.Texte15 is a value on the form and minimum is the minimum stock value each record has on stockTable.
let me paint you a picture,on a form there are textboxes and there is one when the minimum is reached,it enables the texboxe and change the colr to red
This code does not want to work.
Please help on to fix them with the rigth syntax
Regards