Access Item Genie demo for Organizing / Tracking your Items

I started working on another form idea to display a larger image after you click on the smaller image in the item list. Just using a popup form. I just started to realize the pictures are just to small to look at when it's needed to see more detail. That's a fairly easy modification.

Just downloaded V16 now, I will review it.
 
I think the main tables are pretty stable. I only swapped out the ItemImages, tblItems, and tblLocations. So doing a split at this point should be OK. We can always stich it back if needed. The new form is frmItemImage and simply opens a larger view of the current image.

I added my form and placed a transparent button over the image in the subFrmItems. It works as desired. So not much of a change, but I like it.
 

Attachments

@Mike Krailo,
Here is a Split version. On Open you will get prompted to browse for your backend. You should get a file browser and it should then relink after browsing to your back end db.
I modified the image pop up a little using an unbound method.
Create a clean backend and import all of your tables. Replace my backend db with yours. In the future when I post a new Front end you should get a the prompt again and once you select your backend db it should work.
Even though it is split, it currently does not support multi user since the image and icon folders are hard coded to where the Front end resides. However, It could be made that way be allowing the user to define the shared location of these folders. Not sure if there is a need for that.

I also noticed I left a debug msg in the RemoveImage method. You can code this out.
'MsgBox GetImageRemoveDefault
 

Attachments

I renamed the ItemImages folder and copied my folder in. I'm getting runtime error 2220. Can't find open the file '43'.

Is this what you were trying to do:
Code:
Private Sub Form_Open(Cancel As Integer)
   If Me.OpenArgs & "" <> "" Then
     Me.imgItemImage.Picture = GetItemPictureFolder() & "\" & DLookup("ItemImage", "tblItems", "Item_ID=" & OpenArgs)
   End If
End Sub
 
Last edited:
Even though it is split, it currently does not support multi user since the image and icon folders are hard coded to where the Front end resides. However, It could be made that way be allowing the user to define the shared location of these folders. Not sure if there is a need for that.
No need for that.
 
You need to keep your image and icon folder an put your current db in the backend folder. Then link to your db. The names of the image folders are hardwired so they need to remain the same and located in the folder where the front end resides.
Yes, that's exactly what I did. I got the error because the code was simply inserting the numeric Item_ID via openargs and into:
Me.imgItemImage.Picture = Me.OpenArgs instead of the full path to the actual image name.
 
Yes, that's exactly what I did. I got the error because the code was simply inserting the numeric Item_ID via openargs and into:
Me.imgItemImage.Picture = Me.OpenArgs instead of the full path to the actual image name
That does not make sense unless you are using your old forms. Because my code passes the whole path not an Item_ID

Code:
Private Sub imgItem_DblClick(Cancel As Integer)
  If Me.ItemImage & "" <> "" Then
    DoCmd.OpenForm "frmItemImage", , , , , , mdlItemGenieUtilities.GetItemPictureFolder & "\" & Me.ItemImage
  End If
End Sub
The numeric Item_ID is not passed anywhere in the code. It is the folder location concated with the file name.

Tennis.png
 
Well, let me start from scratch again and see if anything changes. I'm pretty sure all I did was replace the two tables and the item images folder and let the new app prompt for location of the BE. I immediately got that error showing the passed in info was a numeric value. I did later reason out that you may have wanted to pass the entire path in OpenAargs, but didn't look further after I got it working again. I'll check it now for sanity's sake.

UPDATE: I just did another experiment linking to my BE file and replacing the ItemImages folder and get the same error I described. So not sure what is going on because the double click event shows the item_id as the thing getting passed and not the full path to image file.

Code:
Private Sub cmdLargeImage_DblClick(Cancel As Integer)
   DoCmd.OpenForm "frmItemImage", , , , , acDialog, Me.Item_ID
End Sub
 
Last edited:
OK I see the issue. I was looking at the wrong place. I put the function on the ItemDetails / AddEditItem form and you are referring to the continuous subform.

Modify that to
Code:
Private Sub cmdLargeImage_DblClick(Cancel As Integer)
  If Me.ItemImage & "" <> "" Then
    DoCmd.OpenForm "frmItemImage", , , , , , mdlItemGenieUtilities.GetItemPictureFolder & "\" & Me.ItemImage
  End If
End Sub
 
Yes, that makes sense. I forgot about the other form too. I would normally just use this from the continuous form, but having it work in both places is a good thing. You're suggestion will work too, it's just the opposite place of what I did in post #65. I have no problem with doing it that way.

The only reason why I used the command button overlay was to access the current ID from the double click event which wasn't working when I applied it to the image control directly.
 
OK I see the issue. I was looking at the wrong place. I put the function on the ItemDetails / AddEditItem form and you are referring to the continuous subform.

Modify that to
Code:
Private Sub cmdLargeImage_DblClick(Cancel As Integer)
  If Me.ItemImage & "" <> "" Then
    DoCmd.OpenForm "frmItemImage", , , , , , mdlItemGenieUtilities.GetItemPictureFolder & "\" & Me.ItemImage
  End If
End Sub
It wasn't working at first, because openargs is always null and skips the command to open the form. Removing the condition of checking for openargs got it working.
 
The only reason why I used the command button overlay was to access the current ID from the double click event which wasn't working when I applied it to the image control directly
I forgot you have to do it that way. For some reason an image control cannot take focus. So when you double click the image it does not move to that record and probably always shows whatever was previously selected or the first record. This seems to be a pretty common problem people have.
 

Users who are viewing this thread

Back
Top Bottom