Hi Andrzejek,
Thanks! I've actually tried your way but I'm getting a compile error: Next without For
Private Sub Form_Load()
On Error GoTo FormLoadErr:
Dim ctl As Control
Me.cTemp.SetFocus
Dim pic As Variant
For Each ctl In Me.Controls
If TypeOf ctl Is CommandButton Then
If ctl.Name...
Hi Strongman, I'll have look it's possible I haven't tested on another pc or network.
But I also have another issue which I think has to do with a Null field
I'm getting a "cmdOrder01-Type mismatch" error if the PhotoURL field is empty or Null
Any idea how do I code this to ignore the data...
@ OzFoxy - This worked perfect many thanks for your help and everyone's input, You can see attachment and idea of what I/m trying to achieve, still more work to do
Its the full path C:\SomeFolder\Images\MyPicture.bmp that's on the table field cmdPhotoUrl
tblCmds
cmdID Short Text
cmdCaption Short Text
cmdPhotoUrl Short Text
Hi Duane, Ive been doing that exactly. I've managed to the pictures to show if the the link field for the photo is not null. But if the field is empty and null I get the error for the command button with the empty field e.g. cmdOrder2 which has no data
"cmdOrder02-SampleDB can't open tje file...
Hello All,
I have a subform that acts like a grid that displays 24 command button ( 4 Rows and 6 columns)
tblCmds
cmdID Short Text
cmdCaption Short Text
cmdPhotoUrl Short Text
Private Sub Form_Load()
On Error GoTo FormLoadErr:
Dim ctl As Control
Me.cTemp.SetFocus
For Each...
Hi Duane / Andy,
It's been awhile but I did use the the DLookup Function and it's working perfect!
Many thanks for the suggestion much appreciated,
Steve
After playing around decided to stay with the Button Control instead of the Image Control.
Must have been a bug or something I just copied and paste the table again and added new data. Seems to be working just fine now both in my personal and work pc.
Thanks all,
Hello All,
I have an unbound form called Recs with 2 unbound textboxes
Textbox1 called ProductNo
Textbox2 called ProductCode
Textbox1 has the ProductID from the Products Table already filled in
I am trying to fill in Textbox2 with the ProductCode corresponding to the ProductID from the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.