searching a specific record

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #16
    Like many other threads tonight I can only offer to post another day.

    This is interesting and there are solutions, but my brain is not up to anything complicated tonight :(

    Feel free to bump the thread if you hear nothing from me tomorrow.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32633

      #17
      Right, now that I seem to have my mental faculties back and working again, I will try to answer some of your points. There are a few, so I will answer thm as I get to them...

      New Records :
      There is a wizard that you can select when creating a ComboBox, that creates a control where you can select a record from the list, and this record will then be displayed on the form. This will not handle adding new records, but will provide VBA code which you can manipulate to use a search (rather than a simple match). From here it's not too much of a stretch to change it to go to a New record if the search criteria TextBox is blank. Let me know if further explanation necessary for this, or if you get stuck while trying it out.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #18
        More New Records :
        To prepare the Drawing Number TextBox (bound), which we will call txtDrawingID for now, I suggest you produce a function which returns the valid value. I don't have the MetaData of your table so can only help in general terms here.

        First produce the first part ("0850" for 2008 I believe). Next use a DMax() to search in your table for the highest [DrawingID] value starting with "0850". A Null will be returned if none yet exist. Take the last three characters (Use Nz() to return "0" if Null), then convert that string to a number. Format this number into three digits and append it to your "0850" string. This is the string value your function should return.

        Let me know how you get on with this.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32633

          #19
          I think my last two posts lead you to a way where your other complications disappear. As such I won't go into your last posts (Normally I would try to answer all raised points). In this case I think (at the moment at least) that it would be a waste of time.

          Comment

          • tkip
            New Member
            • Aug 2008
            • 16

            #20
            Originally posted by NeoPa
            I think my last two posts lead you to a way where your other complications disappear. As such I won't go into your last posts (Normally I would try to answer all raised points). In this case I think (at the moment at least) that it would be a waste of time.
            It is somewhat true that your post pointed me to the place where I should spend more time.

            Anyway, thanks for even posting a reply.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32633

              #21
              I can still answer questions, I simply didn't feel it made much sense to cover those at this time. If you have further difficulties just post :)

              Comment

              Working...