K
Klingon Coder
Hi,
I have a form in Access 2003 that has several command buttons that allow the
user to either open an existing hyperlink or assign one if there is not one
stored in the corresponding text boxes which have been set to invisible.
The problem I am having stems from one command button, which needs to
perform mulitiple tasks.
First: I need to check if a hyperlink has been stored and if so open it.
(no difficulties with this part)
Second: If no hyperlink is stored in the text box I need to search a
specific directory for an Excel file that contains part of the primary key
listed on my form as the file name i.e. PrimaryKey_Form.xls. (no clue on
this)
Third: If the file exists I need to add the hyperlink to the text box and
open the file. (clueless here too)
Fourth: If the file does not exist, I need to be able to open Form.xls,
rename it to PrimaryKey_Form.xls and then carry out the Third step.
I am hoping someone can explain how I can go about achieving these goals or
at least point me in the right direction. I should warn you that my VBA
skills are limited and quite rusty, so if you provide code examples, it would
be helpful if you can provide comments to explain what is happening.
--
Cheers
Klingon Coder
"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"
I have a form in Access 2003 that has several command buttons that allow the
user to either open an existing hyperlink or assign one if there is not one
stored in the corresponding text boxes which have been set to invisible.
The problem I am having stems from one command button, which needs to
perform mulitiple tasks.
First: I need to check if a hyperlink has been stored and if so open it.
(no difficulties with this part)
Second: If no hyperlink is stored in the text box I need to search a
specific directory for an Excel file that contains part of the primary key
listed on my form as the file name i.e. PrimaryKey_Form.xls. (no clue on
this)
Third: If the file exists I need to add the hyperlink to the text box and
open the file. (clueless here too)
Fourth: If the file does not exist, I need to be able to open Form.xls,
rename it to PrimaryKey_Form.xls and then carry out the Third step.
I am hoping someone can explain how I can go about achieving these goals or
at least point me in the right direction. I should warn you that my VBA
skills are limited and quite rusty, so if you provide code examples, it would
be helpful if you can provide comments to explain what is happening.
--
Cheers
Klingon Coder
"Ancient Klingon Proverb - Act and you shall have dinner, Think and you
shall be dinner"