Full Version: compare a field on a form to an entry in a table
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
col
I have an unbound field on a form that lists the full path and filename of an excel file (i allow the user to browse for an excel file to import and the full path and filename is displayed in this unbound textbox). i then save the full path and filename in a table. i compare the complete path and filename of the unbound textbox to an entry in the table to prevent a duplicate import of the same file. this works great, however if the user imports the same file from a different path, the same excel file will be allowed to be imported. what i'd like to do is somehow compare just the filenames.. can this be done?

thanks.
vtd
I am sure it can be done but in this case, my guess is that you should think whether to store the data as one Field [FullPathName] or store as 2 separate Fields [Path] and [FileName] ... since you are treating / using the data as 2 separate properties ...

From your description, I think you are storing the data as one Field value (???).
col
i think splitting the path and filename would solve my problem..

thanks.
vtd
You're welcome ... Glad to help ...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.