Deselecting a Record

Hierophant

Registered User.
Local time
Today, 17:00
Joined
Mar 14, 2003
Messages
28
Greetings,
I need to know how to go about deselecting the current record in a form, so that no record is selected as such.

I have a List, of Current Clients, and when I select a Client, and hit the 'Move to History' button, the client will dissapear from the list, but in actual fact it is still the current record!


Thanks in advance!

P.S. I know you can use GoToRecord and jump to the Next, previous, or a particular record - but how to jump to nothing is what I need.
 
When you move the client to the other table do you delete the record in the form you are looking at? If so then Refresh the form of if it is a subform Requery it.

If you are in fact moving the data I would suggest that you don't, but add a Yes/No field to your table called Archived and check that field when you no longer want to see that client in your form. A requery or refresh of the form will show only current clients.

hth,
Jack
 
You question indicates a misundersanding of what Access does and/or is doing.

When you display a record in a form, there is no selecting or de-selecting it; it's just the current record being displayed. A form always displays a record (sometimes even those deleted) or is adding a new record.

You posting:

"I have a List, of Current Clients, and when I select a Client, and hit the 'Move to History' button, the client will dissapear from the list, but in actual fact it is still the current record!"

is ambiguous. Is the "list" a list box? If not, what is it? What's its record/row source? What the recordsource for your form? What is the code behind you 'Move to History' button? Where do you want to jump to "nothing," in your "list" (whatever that is) or your form.

If you're trying to position to a Customer record from a list of customer, put your CustomerList in a combo box, with the CustomerID hidden in column zero (one actually), then on the comboxbox after update event requery your form filtered by CustomerID. If you want to go to nothing record, on the combobox afterupdate event, if your combobox value (CustomerID) is null, set your form filter to CustomerID=-1, requery the form and you'll get a null record displayed in your form.
 

Users who are viewing this thread

Back
Top Bottom