Results 1 to 6 of 6

Thread: Bound form -- Move to record with matched criteria

  1. #1

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Bound form -- Move to record with matched criteria

    I have a somewhat bound form (ID, Name, Anniversary, etc are bound), but lots of other stuff isnt. Now, what I need to do, is when the user changes the ID combobox (populated with all the ID's from a table), it will move to the record with the proper ID.


    If the form wasnt bound this would be simple, however, since it is, I cant find any way to accomplish this.


    Would the only way be to use DoCmd,,AcNext/Previous until it hits the correct record?
    Last edited by kfcSmitty; Aug 8th, 2005 at 02:19 PM.

  2. #2
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Bound form -- Move to record with matched criteria

    No just requery the recordsource in the afterupdate event on the combobox..

    VB Code:
    1. Me.RecordSource = "SELECT * FROM tblTable WHERE condition"
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  3. #3

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Bound form -- Move to record with matched criteria

    much obliged..Thats 2 reps I owe ya

  4. #4
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: [RESOLVED] Bound form -- Move to record with matched criteria

    Don't worry about it... it's not always about reps.. besides I get a lot anyway (albiet most of them are grey.. )
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  5. #5

    Thread Starter
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: [RESOLVED] Bound form -- Move to record with matched criteria

    I just realised..this doesnt move to the selected record, it requeries so its the only record being displayed..thats no good

  6. #6
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: Bound form -- Move to record with matched criteria

    Yeah it will reduce it down to just the record that is created..

    The command you need is

    you will need to work out the position of the record

    VB Code:
    1. DoCmd.GoToRecord , ,acGoTo=12

    Either that or you will need to program up a return button to cancel the filter..
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

Posting Permissions

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



Click Here to Expand Forum to Full Width