A
Alan
Not sure I have the title right here, but here goes
Thanks to an earlier post I now have my Form with many buttons beautifully
coloured etc. However as I update the information the data on screen becomes
dated ... I have toyed with the idea of storing information about Control
Objects in a table alongside the SQL that provides the value and have written
a small if loop to attempt to marshal this function however am clearly going
somewhere wrong
Dim rstData As Recordset
Dim CtrlSource As Control
Dim Executable As String
strSQL = "SELECT * FROM tblControlSQL WHERE
(((tblControlSQL.DATASET)='Employee'))"
Set rstData = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)
While rstData.EOF = False
With rstData
Set CtrlSource = .Fields("Name")
Executable = .Fields("ExecutableSQL")
CtrlSource = CountRows(Executable)
.MoveNext
End With
Wend
I had hoped this would update all buttons and text boxed called from the
SELECT statement viz Forms!btnParttime.Caption = *the result of the SQL
associated in the table
Maybe Im way of the mark here .. Can anyone tell me if this is possible or
where i should look for an alternative
Many Thanks
Thanks to an earlier post I now have my Form with many buttons beautifully
coloured etc. However as I update the information the data on screen becomes
dated ... I have toyed with the idea of storing information about Control
Objects in a table alongside the SQL that provides the value and have written
a small if loop to attempt to marshal this function however am clearly going
somewhere wrong
Dim rstData As Recordset
Dim CtrlSource As Control
Dim Executable As String
strSQL = "SELECT * FROM tblControlSQL WHERE
(((tblControlSQL.DATASET)='Employee'))"
Set rstData = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)
While rstData.EOF = False
With rstData
Set CtrlSource = .Fields("Name")
Executable = .Fields("ExecutableSQL")
CtrlSource = CountRows(Executable)
.MoveNext
End With
Wend
I had hoped this would update all buttons and text boxed called from the
SELECT statement viz Forms!btnParttime.Caption = *the result of the SQL
associated in the table
Maybe Im way of the mark here .. Can anyone tell me if this is possible or
where i should look for an alternative
Many Thanks