|
-
Aug 8th, 2005, 10:01 AM
#1
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.
-
Aug 8th, 2005, 10:09 AM
#2
Re: Bound form -- Move to record with matched criteria
No just requery the recordsource in the afterupdate event on the combobox..
VB Code:
Me.RecordSource = "SELECT * FROM tblTable WHERE condition"
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Aug 8th, 2005, 10:24 AM
#3
Re: Bound form -- Move to record with matched criteria
much obliged..Thats 2 reps I owe ya
-
Aug 8th, 2005, 10:26 AM
#4
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
-
Aug 8th, 2005, 02:19 PM
#5
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
-
Aug 8th, 2005, 03:13 PM
#6
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:
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|