I can do this in Visual Basic but on an Access form it has me flumoxed. (Why is VBA so completely different to VB in so many regards ?)
What I have is a common dialog that allows me to select a file and copy its filepath to a textbox on a subform. That part works just fine.
After the above selection has been performed, I'd like to set up another command button that will transfer the filepath from the original textbox to another textbox where the filepath name will be stored in a data table.
txtOpenFile is the name of the textbox that holds the returned filepath name from the common dialog.
txtInvoice is the name of the textbox I'd like to be able to transfer the txtOpenFile text to.
txtInvoice has a control source where the filepath of the selected invoice will be stored in a data table. txtOpenFile is unbound and its job is simply as a temporary destination for the filepath name of the file selected from the common dialog.
Both textboxes are on the same subform and if I can successfully transfer the filepath name to the txtInvoice textbox it will be saved as part of a customers records.
As an aside, I'd also like to know if it's possible to set a final command button up that will open the file based on its filepath name stored in txtInvoice, keeping in mind that as customer records are browsed, whichever invoice belongs to the current formview customer will be listed. The file type will always be Excel and I was thinking along the lines of ShellExecute txtInvoice.text\*.* and so on.
Any thoughts anyone ?
It's driving me nuts.
I'm getting too old for this...
What I have is a common dialog that allows me to select a file and copy its filepath to a textbox on a subform. That part works just fine.
After the above selection has been performed, I'd like to set up another command button that will transfer the filepath from the original textbox to another textbox where the filepath name will be stored in a data table.
txtOpenFile is the name of the textbox that holds the returned filepath name from the common dialog.
txtInvoice is the name of the textbox I'd like to be able to transfer the txtOpenFile text to.
txtInvoice has a control source where the filepath of the selected invoice will be stored in a data table. txtOpenFile is unbound and its job is simply as a temporary destination for the filepath name of the file selected from the common dialog.
Both textboxes are on the same subform and if I can successfully transfer the filepath name to the txtInvoice textbox it will be saved as part of a customers records.
As an aside, I'd also like to know if it's possible to set a final command button up that will open the file based on its filepath name stored in txtInvoice, keeping in mind that as customer records are browsed, whichever invoice belongs to the current formview customer will be listed. The file type will always be Excel and I was thinking along the lines of ShellExecute txtInvoice.text\*.* and so on.
Any thoughts anyone ?
It's driving me nuts.
I'm getting too old for this...