Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Can I derive Import file name from form inputs ?

Discussion in 'Information Technology' started by Eric @ CMN, Evansville, Nov 15, 2005.

  1. Eric @ CMN, Evansville

    Eric @ CMN, Evansville
    Expand Collapse
    Guest

    I have a form where the user selects a date range for which to run some
    reports. Currently there is a separate menu option to process the monthly
    imports to prep the data for reporting. The excel files that are imported
    into Access are manually named each month with the month and year as part of
    the file path and name (the rest of the file path and name are consistent.)
    Can I take inputs from the form where the user defines the date range to run
    the reports for to feed the import statements the proper path and file names,
    rather than having to manually change those each month prior to running the
    import process ?

    Thanks !
     
  2. Loading...

    Similar Threads Forum Date
    Sanskrit is derived from Tamil Relationships Aug 19, 2010
    Importance Of Dastar History of Sikhism Aug 12, 2016
    Importance Of Tirath / Pilgrimage As Per Gurbani Gurmat Vichaar Jun 1, 2016
    Superheroes: Arjan Bhullar Explains Wrestling's Importance In The Sikh Community Sports & Fitness Apr 15, 2016
    Important decisions in life Questions and Answers May 25, 2015

  3. Ken Snell [MVP]

    Ken Snell [MVP]
    Expand Collapse
    Guest

    Yes. Are you using TransferSpreadsheet? If yes, you can use "string
    concatenation" expressions that incorporate the values from controls on a
    form. Provide us with more details about your exact setup for the import --
    including whether you're using VBA code or a macro, the form name, the
    controls' names, the data type in each control, etc..

    --

    Ken Snell
    <MS ACCESS MVP>

    "Eric @ CMN, Evansville" <EricCMNEvansville@discussions.microsoft.com> wrote
    in message news:DBECC701-EDEC-48A5-9059-073C6C815960@microsoft.com...
    >I have a form where the user selects a date range for which to run some
    > reports. Currently there is a separate menu option to process the monthly
    > imports to prep the data for reporting. The excel files that are imported
    > into Access are manually named each month with the month and year as part
    > of
    > the file path and name (the rest of the file path and name are
    > consistent.)
    > Can I take inputs from the form where the user defines the date range to
    > run
    > the reports for to feed the import statements the proper path and file
    > names,
    > rather than having to manually change those each month prior to running
    > the
    > import process ?
    >
    > Thanks !
     
  4. Eric @ CMN, Evansville

    Eric @ CMN, Evansville
    Expand Collapse
    Guest

    I'm still developing the form....as of now I have text boxes on the form that
    break out the peices of the dates (converted to text with leading zeros added
    if necessary) input by the user that I need for the path and file names. My
    standard operating procedure is to use macros (at first....to develop a
    prototye and test out logic) and then switch things to VBA code. Can I use
    [form]![textboxname] logic in the file name parameter of a
    transferspreadsheet action in a macro ? Or will I have to go straight to VBA
    for this one ?

    I seem to recall doing something similar at a previous employer, but like a
    good employee, I left all my work from that employer at that
    employer....."intelectual property" of the company, not mine...I was an
    employee, not a contractor.

    "Ken Snell [MVP]" wrote:

    > Yes. Are you using TransferSpreadsheet? If yes, you can use "string
    > concatenation" expressions that incorporate the values from controls on a
    > form. Provide us with more details about your exact setup for the import --
    > including whether you're using VBA code or a macro, the form name, the
    > controls' names, the data type in each control, etc..
    >
    > --
    >
    > Ken Snell
    > <MS ACCESS MVP>
    >
    > "Eric @ CMN, Evansville" <EricCMNEvansville@discussions.microsoft.com> wrote
    > in message news:DBECC701-EDEC-48A5-9059-073C6C815960@microsoft.com...
    > >I have a form where the user selects a date range for which to run some
    > > reports. Currently there is a separate menu option to process the monthly
    > > imports to prep the data for reporting. The excel files that are imported
    > > into Access are manually named each month with the month and year as part
    > > of
    > > the file path and name (the rest of the file path and name are
    > > consistent.)
    > > Can I take inputs from the form where the user defines the date range to
    > > run
    > > the reports for to feed the import statements the proper path and file
    > > names,
    > > rather than having to manually change those each month prior to running
    > > the
    > > import process ?
    > >
    > > Thanks !

    >
    >
    >
     
  5. Ken Snell [MVP]

    Ken Snell [MVP]
    Expand Collapse
    Guest

    In the File Name argument of the TransferSpreadsheet action in the macro:,
    for example

    ="C:\MyFolder\" & Forms!NameOfForm!NameOfTextBox & ".xls"

    --

    Ken Snell
    <MS ACCESS MVP>

    "Eric @ CMN, Evansville" <EricCMNEvansville@discussions.microsoft.com> wrote
    in message news:B193D0DE-6901-4617-B419-8CD193E357EE@microsoft.com...
    > I'm still developing the form....as of now I have text boxes on the form
    > that
    > break out the peices of the dates (converted to text with leading zeros
    > added
    > if necessary) input by the user that I need for the path and file names.
    > My
    > standard operating procedure is to use macros (at first....to develop a
    > prototye and test out logic) and then switch things to VBA code. Can I use
    > [form]![textboxname] logic in the file name parameter of a
    > transferspreadsheet action in a macro ? Or will I have to go straight to
    > VBA
    > for this one ?
    >
    > I seem to recall doing something similar at a previous employer, but like
    > a
    > good employee, I left all my work from that employer at that
    > employer....."intelectual property" of the company, not mine...I was an
    > employee, not a contractor.
    >
    > "Ken Snell [MVP]" wrote:
    >
    >> Yes. Are you using TransferSpreadsheet? If yes, you can use "string
    >> concatenation" expressions that incorporate the values from controls on a
    >> form. Provide us with more details about your exact setup for the
    >> import --
    >> including whether you're using VBA code or a macro, the form name, the
    >> controls' names, the data type in each control, etc..
    >>
    >> --
    >>
    >> Ken Snell
    >> <MS ACCESS MVP>
    >>
    >> "Eric @ CMN, Evansville" <EricCMNEvansville@discussions.microsoft.com>
    >> wrote
    >> in message news:DBECC701-EDEC-48A5-9059-073C6C815960@microsoft.com...
    >> >I have a form where the user selects a date range for which to run some
    >> > reports. Currently there is a separate menu option to process the
    >> > monthly
    >> > imports to prep the data for reporting. The excel files that are
    >> > imported
    >> > into Access are manually named each month with the month and year as
    >> > part
    >> > of
    >> > the file path and name (the rest of the file path and name are
    >> > consistent.)
    >> > Can I take inputs from the form where the user defines the date range
    >> > to
    >> > run
    >> > the reports for to feed the import statements the proper path and file
    >> > names,
    >> > rather than having to manually change those each month prior to running
    >> > the
    >> > import process ?
    >> >
    >> > Thanks !

    >>
    >>
    >>
     
  6. Eric @ CMN, Evansville

    Eric @ CMN, Evansville
    Expand Collapse
    Guest

    Thanks Ken !

    "Ken Snell [MVP]" wrote:

    > In the File Name argument of the TransferSpreadsheet action in the macro:,
    > for example
    >
    > ="C:\MyFolder\" & Forms!NameOfForm!NameOfTextBox & ".xls"
    >
    > --
    >
    > Ken Snell
    > <MS ACCESS MVP>
    >
    > "Eric @ CMN, Evansville" <EricCMNEvansville@discussions.microsoft.com> wrote
    > in message news:B193D0DE-6901-4617-B419-8CD193E357EE@microsoft.com...
    > > I'm still developing the form....as of now I have text boxes on the form
    > > that
    > > break out the peices of the dates (converted to text with leading zeros
    > > added
    > > if necessary) input by the user that I need for the path and file names.
    > > My
    > > standard operating procedure is to use macros (at first....to develop a
    > > prototye and test out logic) and then switch things to VBA code. Can I use
    > > [form]![textboxname] logic in the file name parameter of a
    > > transferspreadsheet action in a macro ? Or will I have to go straight to
    > > VBA
    > > for this one ?
    > >
    > > I seem to recall doing something similar at a previous employer, but like
    > > a
    > > good employee, I left all my work from that employer at that
    > > employer....."intelectual property" of the company, not mine...I was an
    > > employee, not a contractor.
    > >
    > > "Ken Snell [MVP]" wrote:
    > >
    > >> Yes. Are you using TransferSpreadsheet? If yes, you can use "string
    > >> concatenation" expressions that incorporate the values from controls on a
    > >> form. Provide us with more details about your exact setup for the
    > >> import --
    > >> including whether you're using VBA code or a macro, the form name, the
    > >> controls' names, the data type in each control, etc..
    > >>
    > >> --
    > >>
    > >> Ken Snell
    > >> <MS ACCESS MVP>
    > >>
    > >> "Eric @ CMN, Evansville" <EricCMNEvansville@discussions.microsoft.com>
    > >> wrote
    > >> in message news:DBECC701-EDEC-48A5-9059-073C6C815960@microsoft.com...
    > >> >I have a form where the user selects a date range for which to run some
    > >> > reports. Currently there is a separate menu option to process the
    > >> > monthly
    > >> > imports to prep the data for reporting. The excel files that are
    > >> > imported
    > >> > into Access are manually named each month with the month and year as
    > >> > part
    > >> > of
    > >> > the file path and name (the rest of the file path and name are
    > >> > consistent.)
    > >> > Can I take inputs from the form where the user defines the date range
    > >> > to
    > >> > run
    > >> > the reports for to feed the import statements the proper path and file
    > >> > names,
    > >> > rather than having to manually change those each month prior to running
    > >> > the
    > >> > import process ?
    > >> >
    > >> > Thanks !
    > >>
    > >>
    > >>

    >
    >
    >
     

Share This Page