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...
Hi C,
I've also tried coding below replacing it with Value but I was getting a Run-time error '438':
Object doesn't support this property or method with below line
' Caption for the TextBox control
Me.Controls("ProductName" & z).Value = Nz(Me.Products.Column(1), "")
Thanks
Ok, so I have replaced the Button Control with an Image Control it's working now.
Except on the Button Control I was able to add both a caption from a field on the table called ProductName
along with the Image from another field on the table called ProductImage,
I'm getting a Run-time error...
Hi Duane,
Typical Values in Column(2) is an Attachment like a BMP, GIG, PNG , This is the Data Type
TABLE Products
ProductID - Autonumber
CategoryID Number - Number
ProductName -ShortText
ProductImage - Attachment
Description -ShortText
The product...
I have a form that displays a Gridview-like with 20 button controls (displays different products with the name and image)
I have several other button controls which represents Categories and when click calls this function "Call Display_Products"
Function Display Products
w = 0
q = 0
For z = 1...
Hi,
I have a Main form "ManuF" and a subform which is a Tab form "Jobs".
I have no problem printing this report "repFileCover" from the Jobs form when this form is opened by itself
OnClick event: DoCmd.openReport "repFileCover", acViewPreview
Query behind the "repFileCover" below
SELECT...
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.