Hi,
I have a form that lists data from a table. This form has a button in each row, and this button's visibility depends on a column value in that table.
The table: Rechnungsjournal
The column that decides: Mahnung1 -> rst!Mahnung1
the button affected: Mahnung1 -> Me!Mahnung1
I have written the following code:
It's meant to be, when a row has an empty data (or null) under Mahnung1 column, then the button appears. And vice versa.
From the code I've written, all rows have that button, even though some have data under their Mahnung1 column.
I hope you can understand what I'm trying to do and can help me.
Thanks!
Andre
I have a form that lists data from a table. This form has a button in each row, and this button's visibility depends on a column value in that table.
The table: Rechnungsjournal
The column that decides: Mahnung1 -> rst!Mahnung1
the button affected: Mahnung1 -> Me!Mahnung1
I have written the following code:
Code:
qryUpload = "SELECT * FROM Rechnungsjournal"
Set db = CurrentDb()
Set rst = db.OpenRecordset(qryUpload, dbOpenSnapshot)
rst.MoveFirst
Do Until rst.EOF
If rst![Mahnung1] = "" Or IsNull(rst![Mahnung1]) Then
Me!Mahnung1.Visible = True
Else
Me!Mahnung1.Visible = False
End If
rst.MoveNext
Loop
It's meant to be, when a row has an empty data (or null) under Mahnung1 column, then the button appears. And vice versa.
From the code I've written, all rows have that button, even though some have data under their Mahnung1 column.
I hope you can understand what I'm trying to do and can help me.
Thanks!
Andre