Date Picker simulation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hjozinovic
    New Member
    • Oct 2007
    • 167

    Date Picker simulation

    hi all,

    This is the desired scenario:
    -User opens a form in Datasheet view.
    -When TextBox1 is entered (on enter event) a button should appear next to it.
    -When clicked the button opens a search form.
    -User double clicks an item from result list on the search form and data is entered into the TextBox1.

    I accomplished this using a label as 'button that shows up' but this method requires Form to be open in Continous or Single view. But I need it to be open in datasheet view.

    That 'date picker' feature is closest to what I want to have.
    I want to use this instead of using combobox for Text1, because combo box will have more then hundred records to select from.

    Any suggestions on how to accomplish this?

    thanks, h
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    Why does the form need to be in datasheet view and not continuous?

    Comment

    • hjozinovic
      New Member
      • Oct 2007
      • 167

      #3
      Datasheet view allows selecting entire column and copy/pasting from excel.
      column width can be resized...looks better etc.
      I could live without it, but this is more like en experiment. That feature is something useful and I would like to use it in this and my future projects.

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        I've been reading this thread for two days and I'm still not sure what you're trying to do! You talk, in turn, about a command button, a label, a combobox and then a DatePicker.

        At any rate, in a Datasheet View form, command buttons, independent labels and ActiveX controls, like calendars and DateTimePickers , are not available in Form View. Comboboxes will show up, but appear as textboxes with a Down Arrow.

        What I usually use, when needing to have the user trigger an event, in a Datasheet View form, is the DoubleClick event of the textbox in question. You can use this to open your search form.

        Linq ;0)>

        Comment

        • hjozinovic
          New Member
          • Oct 2007
          • 167

          #5
          Linq,

          I'm sure you used date picker which appears next to the control formatted as i.e. 'ShortDate'
          When you click on it a calendar control shows up allowing you to select a date.
          What I want to have is almost the same:
          When I enter the control a little button (or label or whatever) shows on the right side.
          When I click on it, it opens a search form I created.

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            You're talking about the native DatePicker that appears next to textboxes whose Control Source is defined as Date/Time fields, which is an Access 2007 only feature (although I suppose 2010 Beta has it, too.) But you want it to act as a command button to open your search form.

            I understand what you want now, but unfortunately the answer remains the same! In Datasheet View form, command buttons and independent labels are not available when the form is run. As I also said, you could use the DoubleClick event of TextBox1 to open the search form, or I suppose you could use the OnEnter event of TextBox1 to do the same thing, simply cutting out the middle man (the psuedo-DatePicker) altogether!.

            Linq ;0)>

            Comment

            • hjozinovic
              New Member
              • Oct 2007
              • 167

              #7
              As I said above I'm trying to experiment here and create something new and useful.
              Double click event will do the trick. I just wanted a visual 'sign' for the users thata specific text box has more to offer.
              I guess, this thread can be closed...
              Thanks for your suggestions guys.
              h.

              Comment

              • Delerna
                Recognized Expert Top Contributor
                • Jan 2008
                • 1134

                #8
                selecting entire column and copy/pasting from excel.
                column width can be resized...looks better etc
                Don't agree that they look better


                You have a point with selecting columns and copy paste from excel, but...
                You can overcome that by
                *giving the user the ability to switch between continuous or datasheet.
                *Add a button that opens a copy of the form in datasheet (Prossibly the better option)
                *Probably other ways if some thought was given to it

                There are plusses and minuses when using either of the two form views, as indeed there are with all things.
                Datasheet has the plusses that you point out, but one of the minuses are as you are experiencing. Continuous form has similar pluses and minuses but in reverse. Part of our job is to come up with ways of incorporating the plusses and find ways of working around the minuses of whatever it is we are using.

                Obviously we want to develop our applications so that they are as simple and easy to maintain as possible, but if the simplest way to achieve something means that we must use 100 separate forms, what does it really matter, so long as to the user it all flows smoothly.

                PS
                I just want to be sure that it is obvious that the above is said in an effort to be helpful...not critical.

                Attached is an image of continuous form. They can be made to look every bit as good if not better
                Attached Files

                Comment

                • Delerna
                  Recognized Expert Top Contributor
                  • Jan 2008
                  • 1134

                  #9
                  Just saw the post from hjozinovic
                  Wow, it took me more than 19 minutes to write mine

                  Comment

                  Working...