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?
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"
Re: Bound form -- Move to record with matched criteria
much obliged..Thats 2 reps I owe ya ;)
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.. :D)
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 :(
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..