excel to access filename

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lillyehrhart
    New Member
    • Jun 2015
    • 48

    excel to access filename

    how do you take the filename that you imported from excel to access and make a textbox to display the file name?
    I have a textbox for it right now i just dont know how to get it show up.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32662

    #2
    What are you asking actually here? It's so unclear a question that I don't know how to help you. Consider making what you want clearer. Remember that we only know what you tell us, and you've told us very little about the situation your question comes from.

    Comment

    • lillyehrhart
      New Member
      • Jun 2015
      • 48

      #3
      okay. i have a field called spr filename in access. when i am going to import the file from excel to access, i want to make the name of the excel file show up on my form in access.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        You have a field in some tables in some database called [spr filename]. You want this to be shown on some form when you're executing some process that includes an import.

        Now, you'll have to excuse me being a little vague here as there is almost no information to work with, but may I suggest a bound form. The form can be bound to whichever table has the field in it and a TextBox control can be bound to the field itself. The form would allow you (The operator) to navigate through the records in the table and might also have a CommandButton control on that allows you to select which record to use to run the import.

        Does this sound like what you're asking about?

        Comment

        • lillyehrhart
          New Member
          • Jun 2015
          • 48

          #5
          im sorry, i am having a hard time explaining what i am looking for. but yes, i have a field called spr filename and when i import the file to the database from excel, i want the name of that import to show up in the field called spr filename. so i may have 1000 records with the same filename and that would be okay.

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32662

            #6
            So, does my suggestion sound like it's workable to you? If so, do you need help implementing that?

            Comment

            • lillyehrhart
              New Member
              • Jun 2015
              • 48

              #7
              Yes I do need help implementing. I think that is what I am asking for

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32662

                #8
                Ok. That will involve you too, of course.

                I need to know what you have managed to do already. I'm not allowed simply to do it for you.

                When explaining what help you need try to be clear and include all relevant details. It's easier for you to understand what I suggest if I'm using the names of items that you already know rather than vague references to "a form" or "a report" etc.

                Start by asking (and answering) the question :
                Do all my records need to appear on the form or only one instance of each file name?

                Comment

                • lillyehrhart
                  New Member
                  • Jun 2015
                  • 48

                  #9
                  OK I have a form named main class form. And the field is called txtsprfilename. For every record that I have I want it to appear on the form. I have buttons that say next record or prev record, etc. I want every time I click on that button for it to show the filename of the excel spreadsheet in that sprfilename field

                  Comment

                  • NeoPa
                    Recognized Expert Moderator MVP
                    • Oct 2006
                    • 32662

                    #10
                    That's the basic functionality of a bound form. Did you create it using the wizard?

                    If it isn't working for you, what is happening? I need information from you if i am to have any chance of helping.

                    Comment

                    • lillyehrhart
                      New Member
                      • Jun 2015
                      • 48

                      #11
                      No I didn't create it using the wizard. It has no functionality as of right now. It is just on the form right now. I pulled it in when I created the table from the excel sample file.

                      Comment

                      • NeoPa
                        Recognized Expert Moderator MVP
                        • Oct 2006
                        • 32662

                        #12
                        The form will need to be bound to the table. Open the properties of the form and make sure the Record Source is set with the name of your table.

                        The control will need to be bound to the field. Open the properties of the control and make sure the Control Source is set with the name of your field.

                        Report back when this has been done and let us know what you are seeing. Is it working as expected or is something not? If not then explain what that is clearly.

                        Comment

                        • lillyehrhart
                          New Member
                          • Jun 2015
                          • 48

                          #13
                          i do have a question. can you change the record source for only one field, or does it change it for all of them?

                          Comment

                          • NeoPa
                            Recognized Expert Moderator MVP
                            • Oct 2006
                            • 32662

                            #14
                            The latter. It changes it for all controls (Fields).

                            As for terminology, it may help to recognise that a Field is a holder for specific data in a table or query. A control is something that shows data on a form, that may refer to a field in a table or query. Controls can also be unbound. It's helpful to recognise the difference between the two when discussing such issues.

                            Controls can only be bound to Fields that are exposed by the RecordSource of the form. They can also show calculated values, but even they are generally from Fields from the RecordSource.

                            Comment

                            Working...