Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662

    Display LIKE values in Unbound Link Box on entering values in Text Box in Form

    I have a Bound FORM.
    I have a Bound Text Box ( bndTextBox ) on it, which is used for adding new values to a Table.
    I have an Unbound List Box on the Form, whose source is a Query, which has Criteria : Like '* Forms!myForm![bndTextBox] *'.

    What I am looking to do is :

    As I enter an alphabet, the List Box gets populated, with all records from the Table Field to which I am adding a record, containing that alphabet.
    The number of List Box values progressively reduces, as I enter more alphabets in the TextBox.
    Objective, the user can see all similar values for what he is entering in the textbox.

    For eg.
    Table Values :


    Alan
    Beth
    Alice
    Cathy

    1)
    I enter
    A
    in text Box.

    List Box shows Alan, Alice & Cathy.

    I further enter alphabet l.
    Al
    in text Box.

    List Box now shows Alan & Alice.

    I then enter
    Ali
    in text Box.

    List Box now shows only Alice.

    2)
    I enter
    P
    in text Box.

    List Box shows no Records.

    -----------------------------

    Sorry for the long ramble.

    Thanks

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Are you wanting a Find As U Type for the ListBox?

  3. #3
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Quote Originally Posted by burrina View Post
    Are you wanting a Find As U Type for the ListBox?
    That is exactly what I am looking for. I was struggling to come up with the keywords.

    Thanks

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Find As U Type

    Here you go. Hope this helps.
    Attached Files Attached Files

  5. #5
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Was just looking at the same thing, based on the key words provided by you in the previous post.

    http://allenbrowne.com/AppFindAsUType.html

    Will have a go at it.

    Thanks a lot.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    The filtered list would always be short enough to display within listbox?

    Wouldn't a combobox with the dropdown activated give this behavior?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Sorry 4 the delayed response.
    Saw the sample posted by @burina & loved it. It's a real beauty.
    Have not thought about ComboBox presently, though it is what is giving me a problem currently.

    Currently, I have deviated a little bit, as I decided to familiarize myself a little bit with simple forms & VBA.

    Am attaching the db & would request inputs :
    What I am looking to do is ( If I am not wrong, it's called Cascading Combo Boxes ) :
    When I select a value in IndID_FK dropdown in the Form; the ProdID_FK should be populated with Values relevant to the Selected IndID_FK.
    It works fine to some extent. However, when I select a value in the ProdID_FK dropdown, it gives me a error message :

    Code:
    Error Message :
    The current field must match the join key '?' in the table tha serves as the 'one' side of one-to-many relationship
    Enter a record in the 'one' side table with the desired key value, and then make the entry with the desired join key in the 'many-only' table 
    One of those days, seem to be banging my head against a wall.
    Can I request a look at the db & let me know at what stage I am committing a conceptual blunder ?

    Thanks
    Attached Files Attached Files

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    The form RecordSource is a query that includes all 3 tables. This is fine if you want to display the related info from lookup tables in textboxes but those textboxes should be Locked to prevent editing. This form should allow entry/edit of only tblCustomers records. It is not necessary to save the IndID_PK in tblCustomers, there is not even a field in the table for that. So combobox ddlIndID_FK should not be bound. It is bound to field from tblProducts. Selecting value will change the record in tblProducts.

    Must understand that cascading comboboxes/listboxes with lookup alias won't work nice in continuous or datasheet view.

    Cascading comboboxes are not practical in this form design.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    @June,
    Thanks for the inputs.
    Guess, I will have to use something else other than continuous or Datasheet View.
    One last question.
    Is it possible to see the source code behind a Form in Access in totality ?
    For eg. In other languages like HTML, the source code would be something like :

    Code:
    <script>
       myfunction() {
    
       }
    </script>
    
    <form name='myForm' action='' method=''>
    <input type='text' name='txtbox1' onFocus='myFunction()'>
    <input type='submit' name='btnsubmit' value='Add New Record'>
    </form>
    Thanks

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    No, cannot see the code that defines a form as a form or a button a button.

    Even in the HTML, you don't see the code that actually takes the input type parameter of 'submit' and translates that to instructions that construct the button on rendered web page. That would probably require reading assembly language or machine code.

    What you show is similar to the properties we assign when designing objects. Form name, button caption, button name, etc.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Let me rephrase the question.
    Is it possible to create a Form in totality, using VBA in access ( the way we can do with ASP or PHP, etc ) ?

    Thanks

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Thanks a lot June. That was exactly what I was looking for ( Is it possible to develop the form header, form details & form footer for this Form using Code ? If yes request pointers ).

    The reason : As I am totally at sea with Forms, when I use the wizards, I am lost, when things deviate from the expected behaviour.

    I was thinking, if I build a Form from scratch ( since I am not able to view the Source Code for my form made with the wizard ), it will be easier for me to understand what is happening & where I am going wrong.

    Am attaching TestDB_1 as an example ( Still fiddling around with combo boxes with my friend Google ).
    When I enter a New Customer Record, why does the Industry & Product display the previous Entered Values for the Previous Record.
    Why does tabbing not work ?
    Perhaps cannot be accomplished or just a matter of a few tweaks ?

    Thanks
    Attached Files Attached Files

  14. #14
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    Those are all properties of form. Form properties can be set with code.

    I never use the build wizards. I build manually from scratch with design tools. Writing code to do the same thing is too much effort. That's why Access is designed the way it is. Pull objects/controls from the ribbon design tab. Why write one-time-use code for creating hundreds of controls on a single form or report instead of simply pulling from the ribbon and copy/paste? Then manually set properties as I see fit. If I had to write code to build, it probably would be because I didn't have Access available.

    Write code to manage data, not to build forms and reports.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #15
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Not at all planning to write code as a regular way of doing things. Just to get an Idea of how things work.
    Forgot mentioning in my earlier post ( you must have noticed it ), there are two text boxes hiding the two combo boxes.

    Thanks

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 07-15-2014, 03:28 PM
  2. Replies: 18
    Last Post: 04-16-2014, 11:45 AM
  3. Replies: 1
    Last Post: 06-29-2012, 01:22 PM
  4. Lookup values after entering data in form
    By Hulkdog in forum Forms
    Replies: 2
    Last Post: 01-23-2012, 12:31 PM
  5. Replies: 1
    Last Post: 03-27-2010, 06:13 AM

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