Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2010
    Posts
    14

    Unanswered: Thanks, How to make a form field suggest names based on previously filled values

    I have to repeatedly fill in values like names in the FirstName Field, many names are common ,e.g john, if I were to type jo and the field in from suggested John based on the previously filled value, it would be of great help ( The same thing happens in excel automatically).Thanks in advance.....

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14

  3. #3
    Join Date
    Sep 2010
    Posts
    14

    thnks fr reply

    Thanks fr replying, Ill try to use it and come back, at the first go I don't think this is what I require, because from its description it would only carry forward the current value where as I would have hundreds of names in the list; thanks !

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by dkc123 View Post
    ...if I were to type jo and the field in from suggested John based on the previously filled value
    "Previously filled value" would suggest the value from the last record entered, hence Sinndho's suggestion.

    If you're actually talking about any existing FirstName in the table, the best bet would probably be a to create a Combobox pulling FirstName from your underlying table, using Distinct in the SQL so that each first name only appears once. With the Combobox AutoExpand Property set to Yes (the Default) you'll get the exact behavior you're looking for.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Sep 2010
    Posts
    14

    Thanks for the reply!!!

    "Previous " word was probably not correct but at that time I couldn't think of any other way of putting it my problem in words.
    Thanks a lot for the reply, I'll try it and come back with the result...

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    make the source of the combo
    Code:
    select distinct(forename) from MyTable order by forename
    where forename is the name of the column containing forenames and mytable is the name of your table
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Sep 2010
    Posts
    14

    Thanks a lot for your replies!!!!

    Thanks a lot, I tried it and its working perfectly well, just the way I wanted it to. In fact I tried in the design view by inserting combo box , a dialog box open which guides thru;in fact it gives an option to store the value in a designated field. there were some isuues that column width of 1st column had to be changed, in the Row source query I had to open in design view and manually change places of the first column " ID" so that Column "FirstName" became the first ; I did'nt have to touch autoexpand as it was already se to yes ( probably default); but I couldnt understand the SQL distinct part ? ( Sorry for being stupid, I'm a layman in this and have only very little knowledge; pls explain if possible)
    Thanks a lot once again....

  8. #8
    Join Date
    Sep 2010
    Posts
    14

    Thanks fr replying

    Thanks fr replying versys; when I try to insert the following code = select distinct ([NameID]) from [Out Patient Slip] order by ([NameID]) in control source I get a syntax error ( check the subquery's syntax and enclose the subquery in parentheses.) pls elaborate on solutions; thanks

  9. #9
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Try without parentheses:
    Code:
    select distinct [NameID] from [Out Patient Slip] order by [NameID]
    Have a nice day!

  10. #10
    Join Date
    Sep 2010
    Posts
    14

    Thanks a lot for your replies!!!! Multiple conditions pls simplify

    Yes its working, Thanks again to all of you fr prompt replies, sorry I could'nt post earlier as my internet connection was down.
    I'm entering the name and age of patients in the respective fileds, now I want them to be automatically given a title ( MSt, Ms, Mr Mrs.) depending upon their age and marital status, I've been able to do that by using IIf in multiples. I made queriries with conditions so that 1st each row was denoted a letter depending on sex ( e.g if sex=male "Male" otherwise "Female" next column for age , ( e.g if age < 13 "t" otherwise "A")another row for marital status ( e.g if Yes then "M"), then another column combined all these and I get ( e.g 40 yr married woman- "FemaleAM"; In Title column I have manually put up conditions e.g if FemaleAM then "Mrs", if MaleT then Mst. ...... likewise for all other tiles. Pls see attachment.
    My question is - is there a simpler way of doing this instead of making so many columns if I could write all this in one column..
    Thanks in advance
    Attached Thumbnails Attached Thumbnails aaa.gif  

  11. #11
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    new question new thread please
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •