Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 35
  1. #16
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Perhaps you should start by telling us in business terms - What you are trying to do. Plain English.
    We have given samples that don't appear to be helping.

    Textboxes don't have a rowsource. Combo and Listboxes have Rowsource.

    I honestly think you should start by doing some refresher -- sample tutorial - just to get familiar with the basics.
    There are several good youtube videos also.

  2. #17
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I actually have an Access95 database that has the search control I was originally trying to find,
    Would you post the unconverted dB? It will be much easier to see what you are trying to do and maybe I can convert the search function to A2000 for you.
    Don't really need the data (especially if it is sensitive)

  3. #18
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by ItsMe View Post
    So you need to loop through the controls in your form and find a value? That sounds like your tables are not of a normalized structure.
    ItsMe, Was your reply above intended for me? It doesn't seem to relate to anything I've posted here.. (does it?)

  4. #19
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by ssanfu View Post
    Would you post the unconverted dB? It will be much easier to see what you are trying to do and maybe I can convert the search function to A2000 for you.
    Don't really need the data (especially if it is sensitive)
    I greatly appreciate your offer of help. I wish I could post the unconverted DB - but I can't legally pass the data to anyone. I think I will try and find a copy of A95 A97 and see if I can open the DB and delete the data so I can post it here.
    Ally1205
    Last edited by Ally1205; 12-10-2013 at 07:17 AM.

  5. #20
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    If you can give us a clear sample in plain english of the input and expected output, perhaps we can build something we all understand.

  6. #21
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Ally1205 View Post
    ItsMe, Was your reply above intended for me? It doesn't seem to relate to anything I've posted here.. (does it?)
    You mentioned that you are trying to find specific data within a single record. If you do not know what Field/Column this data is in then you will need to look in each column within the row/record. One way, is to loop through textbox controls that are bound to your table. As previously mentioned, a listbox will represent more than one record/row.

    It seems we still do not know what you are trying to accomplish.

  7. #22
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by orange View Post
    Perhaps you should start by telling us in business terms - What you are trying to do. Plain English.
    I will try to explain it better below. I appreciate the suggested solutions you and ItsMe offered which had similar characteristics to the search device I was describing, insofar as they are dynamic, search-as-you-type devices. Perhaps they could be adapted somehow, to do what I'm envisaging. I should have stressed that I need something I can have on my main form, (it's a form which shows one customer record at a time, along with a sub-form showing their orders derived from a linked table).

    Yes, I'd like to find the time to do a crash course in Access coding. Next time I have 2-3 days free, I may look into that. However, I'm not planning to do a lot of Access developing. Nowadays, I just need to use Access in a fairly basic way, for one particular purpose; managing the member list of an organization. The simple relational database application I am using now just needs one or two refinements, including an efficient way of searching for records via the main form (which is a single-record form with a sub-form showing orders from a linked table).

    This is what I'd like (if it's reasonably easy to do): My DB has two linked tables let's call them 'clients' and 'orders'. My form shows one client record at a time, and it also displays a sub-form showing a list of orders placed by the client showing in the form.

    I need a search device on that form, enabling me to search for specific clients. The envisaged search device is a text box into which I can type any string. As I type characters into that text box, the code performs a search which displays (as the current record showing in my main form) the first customer who has that string somewhere in one of his record fields. The search device I once had in my W95 application did exactly that.

    A useful refinement on the above, would be to have some kind of pop-up or drop-down list with about three fields, (say, firstname, lastname and address1, that would appear if the search found more than one client record containing the same string that I just typed. Then I can then click on the desired record in the drop-down or pop-up short-list, and that record will then appear as the current record in my main form.

    I am rather surprised that this exact idea didn't turn up when I googled. Does it seem do-able? Has anyone seen anything similar? I am open-minded to alternative search methods that are equally efficient and user-friendly, but I do hope to avoid having to switch between different forms. Sorry my familiarity with Access is rather rusty, as I'm returning to Access after a 5-year break, and the peak of my limited dexterity was during the days of A95, before MS introduced the vb coding, just as I was getting up to speed... and that pretty much scuppered me! Any developing I've done since then, involving vb, has been pretty basic stuff, by copying other people's code and adapting it by changing the object names, etc.

    Thanks again...
    Ally1205
    Last edited by Ally1205; 12-09-2013 at 07:35 PM. Reason: accessforump05

  8. #23
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by ItsMe View Post
    You mentioned that you are trying to find specific data within a single record. If you do not know what Field/Column this data is in then you will need to look in each column within the row/record. One way, is to loop through textbox controls that are bound to your table. As previously mentioned, a listbox will represent more than one record/row.
    Ah, now I understand how it related to me - thanks! Unfortunately, I'm not savvy enough to know where to put that code exactly. I was hoping for (and rather surprised that I didn't find) a device like what I have in mind (one that someone has already build, that I can copy).

    What I had in mind is described in my reply to Orange, today. I added an idea about a drop-down or pop-up shortlist that I imagine would make the device more user-friendly and efficient in cases where one's search string occurs in more than one record. Is that what you were thinking of when you mentioned "an unbound textbox that would display results in a listbox"?



    Many thanks,
    Ally1205

  9. #24
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Perhaps the suggestion in post #2 regarding a combobox will suffice. You can use and afterupdate event to navigate to a single record that is relevant to the value of the combobox. You can do a similar thing with the list box.

  10. #25
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by ItsMe View Post
    Perhaps the suggestion in post #2 regarding a combo box will suffice. You can use and after update event to navigate to a single record that is relevant to the value of the combo box. You can do a similar thing with the list box.
    Would you be more explicit/descriptive about what you had in mind with this suggestion? Would there be any typing of a search string and if so, what does one type into, and when does the combo box come into play and what does it display? Sorry if I seem dense.

  11. #26
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    You can start by building an example. Create a new unbound form and save it. Click on the wizard and drag a combobox onto your form. You want to associate your combo to the table that has your client info. Include at least the ID and the name of the client. If the wizard asks if you want to hide the ID answer yes.

    In the properties window for the combobox, select the Data tab and make sure that the Limit to List property = Yes.

    Save your form and try out the combo by typing the first characters of a client name. If the ID appears in the first column post up and we can adjust the column width to hide the ID column.

  12. #27
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I wish I could post the unconverted DB - but I can't legally pass the data to anyone.
    Don't need the data. The data can be deleted.
    You should be able to create a copy of the mdb, open it without converting and delete the data from each table.



    Hmmm...I think I still have a copy of A97 (Office 97) someplace. I'll have to look for it....

  13. #28
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by ssanfu View Post
    Don't need the data. The data can be deleted.
    You should be able to create a copy of the mdb, open it without converting and delete the data from each table..
    Steve, The problem is, I am unable to change or delete anything! When I convert the DB to A2000 so that I can open it with my A2000 software, it won't let me change or delete anything whatsoever.

  14. #29
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by ItsMe View Post
    You can start by building an example. Create a new unbound form and save it. Click on the wizard and drag a combobox onto your form. You want to associate your combo to the table that has your client info. Include at least the ID and the name of the client. If the wizard asks if you want to hide the ID answer yes.

    In the properties window for the combobox, select the Data tab and make sure that the Limit to List property = Yes.

    Save your form and try out the combo by typing the first characters of a client name. If the ID appears in the first column post up and we can adjust the column width to hide the ID column.
    Thanks, ItsMe... I've done that. Clicking on the combo box's dropdown-button causes a full list of my 'members' (FirstName and LastName, derived from my 'local members list' table. Now when I type a FirstName (say, John) into the combo box, one of the Johns rises to the top of the list. However, there is more than one John in my table and the others don't rise towards the top of the cbo's list. Can it be configured so that they all rise to the top?

    How do I configure it so that when I click on a member in the drop-down list, that member appears as the current record in my main form?

    Can I configure it so that the search string I type will be looked-for in all text fields in my table (or at least a pre-defined few)? That way, if I can remember a member's address, but not his name, I can type in his house number or street name and easily find him, when all records with a field starting with the typed-in string (not case-sensitive) will rise to the top. If this is difficult to achieve, then just searching on Lastname, (rather than Firstname), would be useful.

    I copied and pasted this cbo onto my main form, and find it still works. That's good, because I'd like it to be on my main form, to avoid switching forms.

    As an illustration of how ignorant I am, I'm baffled as to how this sorting process takes place, as we haven't put any code into the box to tell it to behave in that way, based on what I type!

    Thanks again,
    Ally1205
    Last edited by Ally1205; 12-10-2013 at 11:21 AM. Reason: accessforump05

  15. #30
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    When I convert the DB to A2000 so that I can open it with my A2000 software, it won't let me change or delete anything whatsoever.
    This has worked for me in the past:

    Don't open or convert.
    Create a new (blank) A2000dmb.
    Import all objects from the A97 mdb. (File / Get External Data / Import)

    You should be able to delete the data in the tables.
    Compact and repair

    Now you have all of the objects without data.

    You should now be able to look at the form/code to re-create the search behavior.
    And, should you choose to, post the A2000 version.

    Or maybe you could post screen shots of the form and code from the A97 version......

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 03-30-2013, 10:02 PM
  2. Replies: 1
    Last Post: 04-27-2012, 10:30 AM
  3. variable returning 1990 for the year
    By TinaCa in forum Programming
    Replies: 3
    Last Post: 08-31-2011, 09:51 AM
  4. Close form but remember record
    By Mclaren in forum Programming
    Replies: 3
    Last Post: 07-10-2011, 12:02 PM
  5. I saw this done before but don't remember how and where...
    By tigers in forum Import/Export Data
    Replies: 1
    Last Post: 10-15-2006, 05:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums