JLeo,
I've found OLEs to be difficult to work with if you want to be able to manipulate the photo. You could use it to initially display the photo.
I load the file path of each of my photos i.e., C:\Photos\SiteID\picture.jpg in a field with a picture description in another field. (I have a...
lameid,
Your strPic = "<CDROM>" & txtLink.text was in the right direction but first I had to get the system to figure out where the CD rom drive was. I found this code at the Microsoft site (changed it slightly).
This went in the form.
Private Sub Main()
' Call the...
I'll assume you're using a form. Place a combo box (cboState)with a label that says 'Select State'. You can pick the combo box value up and use it to refine both the data diplayed and the report.
Private Sub cboState_Click()
On Error GoTo NoState
Dim strState as String
strState = Me![cboState]...
Another way to do this is to assign the contents of the combo box to the form's filter then pass the filter to the report.
Private Sub cboChoice_Click()
On Error GoTo NoChoice
Dim sHold As String
sHold = Me![cboChoice]
Me.Filter = "((qryYouUse.FieldName = '" & sHold & "'))"...
I have a table with the relative file path of each picture (\Photos\Test1\picture.jpg). If you click on the hyperlink in the table, it is able to follow the path back to the CD and open the picture. I have a text box on the form where the hyperlink is visible. If you click on it, it follows the...
Genie,
Your data is still there. It sounds like you need to set your 'display list' to a higher number. In Access click on 'Tools', 'Options', 'Edit/Find'. In the bottom half of the box you'll see your 'FilterByForm' defaults. Change the 'Don't display lists where more than this number of...
I have relative hyperlinks (\Photos\picturename.jpg) in a table. Each link opens a specific picture. When you click on the link it automatically looks on the C drive for the 'Photos' folder then the picturename then opens the picture in my default browser. This works great if the 'Photos' folder...
For anyone interested in using this solution here's a wrap up with the code simplified.
In the module:
Public ParamToQuery As String
Function returnedvalue() As Variant
returnedvalue = ParamToQuery
End Function
In the query: (Place the code below in the criteria line under the field you're...
Hey Jo!
Hallelujah! I figured it out. My paramtoquery value was absolute correct but I was still getting an empty query back. I went back and played with the original query and realized in the qryDesc2 we weren't passing a "Like" criteria definer as we were in the code 'recnum'...
Good Morning, Jo
I tried the code as is and the function picks up the variable but I have an empty query (should be 476 records according to recnum.) When I put in a stop I found that the docmd.openquery runs THEN it goes to the function so I get an empty query. I tried putting a call to...
JO!
The code below works to pass criteria into the check but I still don't know how to pass that same criteria to the query using the DoCmd.OpenQuery when records are > 0.
One step at a time gets you there.
Have a wonderful weekend. Thanks again.
L
Dim sHold As String
Dim recnum As Integer...
Thanks JO. Here's what I did (see code below). The problem I ran into is that "qryDesc" is a parameter query so no value is being passed to it and I get this error: "The expression you entered as a query parameter produced this error: "The object doesn't contain the...
How can I run a query but stop it from opening if it is empty/has no records?
Dim stDocName As String
stDocName = "qryDesc"
DoCmd.OpenQuery stDocName, acViewNormal, acReadOnly
Thanks for the help.
Lightenup
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.