Solved Form: Access, microsoft office viewer (source: arnelgp) (1 Viewer)

vhung

Member
Local time
Today, 14:53
Joined
Jul 8, 2020
Messages
235
Thanks, for the tips, codes, ideas, it helps a lot to extend the use of MS access in the unique way as one creativeness reach the peak.

Dim fd As Object
Set fd = Application.FileDialog(3)
With fd

.Title = strWindowTitle
.Filters.Clear

If Forms![Form: Tab Page]![TabName] = "AllPage" Then
.AllowMultiSelect = True

ElseIf Forms![Form: Tab Page]![TabName] = "PDF" Then
.Filters.Add "PDF", "*.pdf;*.html", 1

ElseIf Forms![Form: Tab Page]![TabName] = "Excel" Then
.Filters.Add "Excel Workbooks", "*.xls;*.xlsx;*.xlsm", 1

ElseIf Forms![Form: Tab Page]![TabName] = "Image" Then
.Filters.Add "Image", "*.png;*.jpeg;*.jpg", 1

ElseIf Forms![Form: Tab Page]![TabName] = "PowerPoint" Then
.Filters.Add "Powerpoint", "*.ppt;*.pptx;*.pps", 1

ElseIf Forms![Form: Tab Page]![TabName] = "Word" Then
.Filters.Add "Word", "*.docx;*.docm;*.doc;*.txt", 1

ElseIf Forms![Form: Tab Page]![TabName] = "Outlook" Then
.Filters.Add "Outlook", "*.ics;*.xml;*.msg;*.vcf;*.srs;*.exe;*.pst", 1

ElseIf Forms![Form: Tab Page]![TabName] = "Access" Then
.Filters.Add "Access", "*.Accdb;*.Accde;*.mdb", 1

ElseIf Forms![Form: Tab Page]![TabName] = "Folder" Then
DriveAddressCombo.setfocus
End If

If .Show = -1 Then
FilePicker = (.SelectedItems(1))
Else
FilePicker = vbNullString
End If
End With
Set fd = Nothing
 

Attachments

  • pwrpnt2022.png
    pwrpnt2022.png
    171.7 KB · Views: 264
  • pwrpnt2.png
    pwrpnt2.png
    84 KB · Views: 254
Last edited:

SHANEMAC51

Active member
Local time
Tomorrow, 00:53
Joined
Jan 28, 2022
Messages
310
maybe I don't understand something, but such a form name is hardly reasonable
Code:
Forms![Form: Tab Page]![TabName]
Thanks, for the tips, codes, ideas, it helps a lot to extend the use of MS access in the unique way as one creativeness reach the peak.
 

vhung

Member
Local time
Today, 14:53
Joined
Jul 8, 2020
Messages
235
"but such a form name is hardly reasonable"
Forms![Form: Tab Page]![TabName]
--------------------------------------------------

Seems impossible,
it makes the hidden tab visible when you call the specific tab to show
on [TabName] that is combo select like excel or word,
if you choose "word" then the page with the corresponding name will be visible,
this "Forms![Form: Tab Page]!" is part of the expression to locate the object as cue on"![TabName]"

But only, frequently use the expression "Forms![Form: Tab Page]![TabName]" on looping codes (if elseif endif)

After that a .setfocus is assigned to the browser button on the sub.form of Form:TabPage to open a specific file
 
Last edited:

Users who are viewing this thread

Top Bottom