sub form control selection (1 Viewer)

NickNeville

Registered User.
Local time
Today, 00:32
Joined
May 17, 2009
Messages
119
Good morning all
Could anyone advise me on the following please.
I have a sub form on a from which is showing as datasheet.
When I open the form it autoselects the first record in the datasheet.
I need to be able to select / edit the records but on open I need to select
the next empty record. I have tried the single form and continuous forms
with VB ACnext etc but can't seem to manage with what's available,

can you help (if indeed it is possible) please.
I was thinking of using select somehow but my knowledge is limited

many thanks
nick
 

MStef

Registered User.
Local time
Today, 00:32
Joined
Oct 28, 2004
Messages
2,251
In the subForm, in ON LOAD event put:
DoCmd.GoToRecord, ,acNewRec
 

NickNeville

Registered User.
Local time
Today, 00:32
Joined
May 17, 2009
Messages
119
Hi many thanks for your quick reply
I Put the ACnew on the form but
Strange thing but it works when I open the form on its own, but not when it is on the main form as a subform ?
Nick
 

MStef

Registered User.
Local time
Today, 00:32
Joined
Oct 28, 2004
Messages
2,251
Put it in Form_Opne sub (subform).
 

NickNeville

Registered User.
Local time
Today, 00:32
Joined
May 17, 2009
Messages
119
Beg pardon !
yes it does go to the new record, but when I click on my list to show another of the main form's details it selects the first record. Can I add something to this like refresh
the sub form when I click on the list ?

N
 

MStef

Registered User.
Local time
Today, 00:32
Joined
Oct 28, 2004
Messages
2,251
It works on my Pc in both event.
 

MStef

Registered User.
Local time
Today, 00:32
Joined
Oct 28, 2004
Messages
2,251
I don't understand, what is "click on the list"?
 

NickNeville

Registered User.
Local time
Today, 00:32
Joined
May 17, 2009
Messages
119
Ah yes sorry
I have a list box on the main form which when clicked on a persons details, the details
show in the subform. It is here that I now need to add something to take the focus to a new record.
rather than default to the first record in the datasheet.

Nick
 

MStef

Registered User.
Local time
Today, 00:32
Joined
Oct 28, 2004
Messages
2,251
OK. Try to put this code in ON CURRENT SUB.
 

NickNeville

Registered User.
Local time
Today, 00:32
Joined
May 17, 2009
Messages
119
yes that works fine thanks.
many thanks for your patience and help

best rgds
 

Users who are viewing this thread

Top Bottom