473,666 Members | 2,357 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open Dialog filter problem?

6 New Member
My database code works on my server and one laptop, but does not function correctly on two other laptops, all four systems run Vista Business and MSaccess 2007. The code is set up to display the file path in the open dialog file name box, that way the user clicks a button on a form, the open dialog box pops up, and the user just hits enter to open the file (the only reason the dialog box pops up is if the user wants to open a different file) since the file path is already selected. This works on 2 different computers, a server and a stand alone. My problem is that on two other stand alone computers, only the folder path is opened, and the user has to search through many files manually. I am assuming it is some type of a filter setting somewhere...but what would cause this? Even on the two computers that do not work, the filename path is correct, it isn't making it to the file name box in the open dialog screen.

Brian
May 1 '09 #1
14 4270
ChipR
1,287 Recognized Expert Top Contributor
Just for a start, what is the code you're using?
May 1 '09 #2
strat18
6 New Member
ChipR,

Here is a sample of what I'm using...pretty much if there is a file associated with the record, open that file path...it works great on 2 of my computers but the other 2, only the folder path is opened...and I have to search manually through a lot of files...

Expand|Select|Wrap|Line Numbers
  1. If checklist_file > "" Then
  2.         openfilepath = openfilepath & checklist_file
  3.     Else
  4.         If asTemplate = True Then
  5.             openfilepath = openfilepath & DLookup("cfgValue", "_config", "cfgname='mastertemplate'")
  6.         Else
  7.             openfilepath = openfilepath & "*.xml"
  8.         End If
  9.     End If
  10.     Set fd = Application.FileDialog(1)
  11.     fd.initialfilename = openfilepath
  12.     fd.allowmultiselect = False
  13.     fd.show
  14.     If fd.selecteditems.Count <> 1 Then
  15.         checklist_file = ""
  16.     Else
  17.         checklist_file = fd.selecteditems(1)
  18.     End If
Brian
May 1 '09 #3
ChipR
1,287 Recognized Expert Top Contributor
I'm not sure what version of Access you're using, but the 2003 reference says that msoFileDialogOp en is not supported. Maybe try:
Expand|Select|Wrap|Line Numbers
  1. Set fd = Application.FileDialog(3) 'msoFileDialogFilePicker.
May 1 '09 #4
DonRayner
489 Recognized Expert Contributor
On Vista if you install your front-end db into "Program Files" you may be having problems with Data Redirection sending you to an old version of the Database.

If that's the case, this link should be able to offer you some insights.
May 1 '09 #5
strat18
6 New Member
Chip,

I tried your suggestion with negative the same results on my laptop. I also tried the database on another computer with 2003 and the original code worked there as well.

Don,

I do have the database and all associated files under the user documents folder. I will look into permissions to see if that may have anything to do with it but I can write new data to the tables...All of my config paths load correctly, it is strange that just this dialog box doesn't want to play nice. I was wondering if the newer laptops might have a different dll library or something that isn't executing the code as it should...
May 1 '09 #6
ChipR
1,287 Recognized Expert Top Contributor
Can we assume that all the systems are accessing the same recordset, then opening to the same directory on a server? Have you double checked the contents of openfilepath just before trying to show the dialog on the machines where it isn't working correctly?
May 1 '09 #7
Denburt
1,356 Recognized Expert Top Contributor
You might want to check it could possibly be the wild card character especially since you are using 2007 it could be an ANSI standard issue.

http://office.microsoft.com/en-us/ac...766011033.aspx


openfilepath = openfilepath & "*.xml"
May 1 '09 #8
strat18
6 New Member
chip,

I have used the watchlist to see that the entire file path was loaded into openfilepath... then when I step to open the dialog box, all I get is the folder path...I even checked a few lines of code later and still have the correct file path in openfilepath... it's almost like it is being filtered to the folder level...

Denburt,

Do you still think that it would be that line of code since I have the file name in the checklist_file variable and it skips those few lines under the else statement...

openfilepath = "C:\Users\Certi fications\Docum ents\Certificat ions\checklist\ 1319_Inmarsat Mini-M.xml"

which is the correct path...the dialog box is just cutting off the file name at the end...
May 1 '09 #9
ChipR
1,287 Recognized Expert Top Contributor
I'm stumped. In my test, even a file that didn't actually exist would still automatically be put into the File Name box of the open dialog.
May 1 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
5819
by: Jim | last post by:
I am trying to import a file using a file spec from the Access File Open dialog... I have been out to http://www.mvps.org/access/api/api0001.htm to look at the code, but because I'm not a guru, I don't quite understand it all. I have gotten as far as getting the File Open dialog to appear and then tell me what file I chose, but if someone could help me understand how to take that file I've selected and import it using my specification,...
2
2641
by: Pat Richey | last post by:
i'm trying to make an open and a save file dialog that allows you to open/save various formats, but when you change the extension you want to filter the file list disappears until you leave the current directory. here's the code for the save box: SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "Portable Document Format (*.pdf)|*.pdf" + "|Encapsulated Postscript (*.eps)|*.eps" + "|Bitmap (*.bmp)|*.bmp" + "|JPEG...
3
1987
by: GrantS | last post by:
I am needing to permit users to select files using the 'Open file' common dialog box. The format of the names of the files are along the names of: GB00((&X.001.jpg I am not able to show these files in the dialog box for selection. I do need to use filters (cannot use (*.*| all files) I tried using the filter *.*.jpg without success. The filter string I have tried is:
2
2355
by: Don Peters | last post by:
I'm relatively new to ASP.NET. I'm running it under Win XP Pro, using Visual Studio 2002.NET (haven't migrated to VS2003 yet). The ASP.NET application I'm having a problem with was initially set up on a laptop running Win2000, where it ran successfully. I've copied all the files over to my desktop, intending to support it there. But it seems to have a problem upon startup: instead of initially displaying the starting ASP.NET page as it...
2
4408
by: OutdoorGuy | last post by:
Greetings, I have a "newbie" question in relation to opening files from C#. I have a Windows form where I allow the user to type in a file extension in a text box (e.g., "xls"). I then take that extension and use that as my filter criteria for the File Open dialog. Once the user selects a file with that extension (from the File Open dialog), I simply want to open that file (whether it is an .xls file, .txt file, etc.). I am...
1
2437
by: sirimanna | last post by:
I want to know how can i open some text file data using microsoft common dialog control.6 I know how to save text data using microsoft common dialog control.6 code are here, cdlfiles.filter="files(*.srt)\*.ami" cdlfiles.DefaultExt="str" cdlfiles.dialogTitle="save str notepad file" cdlfiles.DialogTitel=cdlOFNOverwritePrompt + cdlOFNPathmustexist on Error GoTo e cdlfiles.showsave
0
1566
by: Kelii | last post by:
Evenlater, Yeah, I don't open the report in preview mode when I setup my recordsource, filters, or sorts. Before I give my solution, I would say that your code will be simpler if you drop the "Sort" button and simply include the sorts in the primary window rather than a window in dialog mode. For example, I use 5 sorts in my preview screen, the first sort is always enabled, the second sort only becomes enabled if the first is not null...
7
4003
by: Peter | last post by:
ASP.NET 2.0 I am trying to open a Word document and Excel document from a dialog web page, what's the best way to do that? I have tried the following: Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
4
1720
by: manojspromantr | last post by:
Hi Friends I am trying to design a form where i need to browse a excel file using a open dialog box & append the same in a Table at the database.Any how i have taken care that the Table fields are in same order as the Excel file does. Please have a look at the below codes which i used to open a "Open Dialog Box" which is working fine. Now i want that when ever i select the File & click open the data in the file should get updated to the...
0
8440
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8352
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8780
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6189
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4358
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2765
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.