Hi every one
What I'm trying to do, is on the form load is modify the properties of a few command buttons based on values of a dataset. Which I seem to have working without any problems
Where I'm coming unstuck, is I then want to fire the OnClick event of the first commandbutton I change. because the dataset can be order/filtered by the user I have no idea which button I'm dealing with at run time.
This is the basic method I'm using
Dim OnClickEventCall as String
Dim cmdBtn as CommandButton
Do While Not RecordSet.EOF
Select case RecordSet.Feilds("btnID")
case 1
cmdBtn = Btn1
case 2
cmdBtn = Btn2
...
End Select
With cmdBtn
Set Some Properties etc
OnClickEventCall = cmdBtn.Name & "_Click"
End With
Loop
Do Some other stuff
Eval (OnClickEventCall)
I admit that my vba coding is a bit rusty, bu I can't for the life of me get the syntax for the Eval call correct.
Thanks for the help
What I'm trying to do, is on the form load is modify the properties of a few command buttons based on values of a dataset. Which I seem to have working without any problems
Where I'm coming unstuck, is I then want to fire the OnClick event of the first commandbutton I change. because the dataset can be order/filtered by the user I have no idea which button I'm dealing with at run time.
This is the basic method I'm using
Dim OnClickEventCall as String
Dim cmdBtn as CommandButton
Do While Not RecordSet.EOF
Select case RecordSet.Feilds("btnID")
case 1
cmdBtn = Btn1
case 2
cmdBtn = Btn2
...
End Select
With cmdBtn
Set Some Properties etc
OnClickEventCall = cmdBtn.Name & "_Click"
End With
Loop
Do Some other stuff
Eval (OnClickEventCall)
I admit that my vba coding is a bit rusty, bu I can't for the life of me get the syntax for the Eval call correct.
Thanks for the help