[AccessD] Specifying where to open browser

Neal Kling nkling at co.montgomery.ny.us
Wed May 28 07:17:03 CDT 2003


One way to approach this would be to add the person's name to the
caption of the browser.


' Set the caption on the dialog
OpenFile.lpstrTitle = "Select Photo for " & Me.PersonFirstName _
	& " " & Me.PersonLastName

You'd have to adjust the field names as appropriate.

Neal Kling
Lotus, isn't that some kind of fancy flower?


-----Original Message-----
From: Kathryn Bassett [mailto:kathryn at bassett.net]
Sent: Tuesday, May 27, 2003 7:35 PM
To: dbAdvisors (AccessD)
Subject: [AccessD] Specifying where to open browser


There is an event procudure that opens the "look in" browser. What would
I add to the below (and where) to get the blasted thing to open in the
center of my screen instead of the upper left of the screen. I need to
see upper left portion of the underlying form, to remind me of the name
of the person I'm looking for in the "look in", and the way it is now, I
have to drag it out of the way.

Thanks,

Private Sub btnbrowse_Click()
         Dim OpenFile As OPENFILENAME
         Dim lReturn As Long
         Dim sFilter As String
         OpenFile.lStructSize = Len(OpenFile)
         OpenFile.hwndOwner = Me.hWnd
         OpenFile.hInstance = 0
         sFilter = "" & Chr(0)
         OpenFile.lpstrFilter = sFilter
         OpenFile.nFilterIndex = 1
         OpenFile.lpstrFile = String(257, 0)
         OpenFile.nMaxFile = Len(OpenFile.lpstrFile) - 1
         OpenFile.lpstrFileTitle = OpenFile.lpstrFile
         OpenFile.nMaxFileTitle = OpenFile.nMaxFile
         ' Start looking in the same directory as the database
         OpenFile.lpstrInitialDir = "D:\MyFiles\Online\muir63\photos63\"
         ' Set the caption on the dialog
         OpenFile.lpstrTitle = "Select Photo"
         OpenFile.flags = 0
         lReturn = GetOpenFileName(OpenFile)
         txtPhoto = Left$(OpenFile.lpstrFile, InStr(OpenFile.lpstrFile,
Chr$(0)) - 1)

--
Kathryn Rhinehart Bassett (Pasadena CA)
"Genealogy is my bag" "GH is my soap"
kathryn at bassett.net
http://bassett.net  

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list