Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.
Private Sub cmdAdd_Click() ' User asked to add a new photo Dim strPath As String ' Grab a copy of the Office file dialog With Application.FileDialog(msoFileDialogFilePicker) ' Select only one file .AllowMultiSelect = False ' Set the dialog title .Title = "Locate the image file" ' Set the button caption .ButtonName = "Choose" ' Make sure the filter list is clear .Filters.Clear ' Add two filters .Filters.Add "JPEGs", "*.jpg" '.Filters.Add "Bitmaps", "*.bmp" ' Set the filter index to 2 .FilterIndex = 2 ' Set the initial path name .InitialFileName = "B:\Dropbox\Business Documents\Database\Database Images\" ' Show files as thumbnails .InitialView = msoFileDialogViewThumbnail ' Show the dialog and test the return If .Show = 0 Then ' Didn't pick a file - bail Exit Sub End If ' Should be only one filename - grab it strPath = Trim(.SelectedItems(1)) ' Set an error trap On Error Resume Next ' Set the image Me.txtImage = strPath ' Set the message in case Image control couldn't find it Me.lblMsg.Caption = "Failed to load the picture you selected." & _ " Click Add to try again." End With ' Put focus in a safe place Me.cmdCloseForm.SetFocus End Sub
|how to address a report control from a form in ms/access vba||9||30|
|MS Access Replace Spaces In Title With Characters Like (-) Dashes In a New Field||16||28|
|Failed implementation Access runtime application||14||25|
|MS Access Trim Function After Specific Character If It Doesn't Exist Then Show The Original Value||5||24|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
21 Experts available now in Live!