A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"GoTo New Record"



 
 
Thread Tools Display Modes
  #1  
Old May 4th, 2005, 07:44 AM
Robin Chapple
external usenet poster
 
Posts: n/a
Default "GoTo New Record"

I have a form in datasheet view which when opened I need the focus to
go to a new record.

I already have a command "GoTo Field".

How do I do that?

Thanks,

Robin Chapple
  #2  
Old May 4th, 2005, 11:53 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Robin,

Open the form in design view, and select the form object (Edit Select
Form). Display the properties window (if not already open) by Vew
Properties, select tab Events, place the cursor in the box next to On
Open and click the little button with the ellipsis sign (...) that
appears on the right; select Macro Builder, give the macro a meaningful
name (so you can tell what it is when you see it later) and add a single
action to it, GoToRecord, with argument Record set to New. Save and
return to the form. The job is done.

HTH,
Nikos

Robin Chapple wrote:
I have a form in datasheet view which when opened I need the focus to
go to a new record.

I already have a command "GoTo Field".

How do I do that?

Thanks,

Robin Chapple

  #3  
Old May 4th, 2005, 01:01 PM
BruceM
external usenet poster
 
Posts: n/a
Default

Just out of curiosity, why a macro instead of a VBA procedure? There seems
to be some difference between the two, but I have never quite sorted out what
it is.

"Nikos Yannacopoulos" wrote:

Robin,

Open the form in design view, and select the form object (Edit Select
Form). Display the properties window (if not already open) by Vew
Properties, select tab Events, place the cursor in the box next to On
Open and click the little button with the ellipsis sign (...) that
appears on the right; select Macro Builder, give the macro a meaningful
name (so you can tell what it is when you see it later) and add a single
action to it, GoToRecord, with argument Record set to New. Save and
return to the form. The job is done.

HTH,
Nikos

Robin Chapple wrote:
I have a form in datasheet view which when opened I need the focus to
go to a new record.

I already have a command "GoTo Field".

How do I do that?

Thanks,

Robin Chapple


  #4  
Old May 4th, 2005, 01:37 PM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Hi Bruce,

A macro in this case, simply because the OP occurred in the
GettingStarted NG, and the question itself justifies the selection of NG
too... new users seem to feel more comfortable with Macros.

In my experience, the difference is that code provides far more
flexibility and control, at the cost of a higher expertise level
requirement. I think once you cross the line, there's no turning back!

Regards,
Nikos

BruceM wrote:
Just out of curiosity, why a macro instead of a VBA procedure? There seems
to be some difference between the two, but I have never quite sorted out what
it is.

"Nikos Yannacopoulos" wrote:


Robin,

Open the form in design view, and select the form object (Edit Select
Form). Display the properties window (if not already open) by Vew
Properties, select tab Events, place the cursor in the box next to On
Open and click the little button with the ellipsis sign (...) that
appears on the right; select Macro Builder, give the macro a meaningful
name (so you can tell what it is when you see it later) and add a single
action to it, GoToRecord, with argument Record set to New. Save and
return to the form. The job is done.

HTH,
Nikos

Robin Chapple wrote:

I have a form in datasheet view which when opened I need the focus to
go to a new record.

I already have a command "GoTo Field".

How do I do that?

Thanks,

Robin Chapple


  #5  
Old May 4th, 2005, 05:56 PM
BruceM
external usenet poster
 
Posts: n/a
Default

Thanks for the reply. A book I read when I was first using Access said that
as of Access 2000 VBA procedures were the way to go, although macro support
was still available. By using VBA procedures from the beginning I guess I
jumped in the deep end, but certainly not for the first time.

"Nikos Yannacopoulos" wrote:

Hi Bruce,

A macro in this case, simply because the OP occurred in the
GettingStarted NG, and the question itself justifies the selection of NG
too... new users seem to feel more comfortable with Macros.

In my experience, the difference is that code provides far more
flexibility and control, at the cost of a higher expertise level
requirement. I think once you cross the line, there's no turning back!

Regards,
Nikos

BruceM wrote:
Just out of curiosity, why a macro instead of a VBA procedure? There seems
to be some difference between the two, but I have never quite sorted out what
it is.

"Nikos Yannacopoulos" wrote:


Robin,

Open the form in design view, and select the form object (Edit Select
Form). Display the properties window (if not already open) by Vew
Properties, select tab Events, place the cursor in the box next to On
Open and click the little button with the ellipsis sign (...) that
appears on the right; select Macro Builder, give the macro a meaningful
name (so you can tell what it is when you see it later) and add a single
action to it, GoToRecord, with argument Record set to New. Save and
return to the form. The job is done.

HTH,
Nikos

Robin Chapple wrote:

I have a form in datasheet view which when opened I need the focus to
go to a new record.

I already have a command "GoTo Field".

How do I do that?

Thanks,

Robin Chapple


  #6  
Old May 4th, 2005, 10:57 PM
Robin Chapple
external usenet poster
 
Posts: n/a
Default

Nikos,

Thanks that worked for the first member. When I selected the next
member I had to scroll again.

Now this may be associated with the fact that the form is a sub form
with members called from a combo box on the main form.

Robin

On Wed, 04 May 2005 13:53:50 +0300, Nikos Yannacopoulos
wrote:

Robin,

Open the form in design view, and select the form object (Edit Select
Form). Display the properties window (if not already open) by Vew
Properties, select tab Events, place the cursor in the box next to On
Open and click the little button with the ellipsis sign (...) that
appears on the right; select Macro Builder, give the macro a meaningful
name (so you can tell what it is when you see it later) and add a single
action to it, GoToRecord, with argument Record set to New. Save and
return to the form. The job is done.

HTH,
Nikos

Robin Chapple wrote:
I have a form in datasheet view which when opened I need the focus to
go to a new record.

I already have a command "GoTo Field".

How do I do that?

Thanks,

Robin Chapple


  #7  
Old May 4th, 2005, 11:00 PM
Robin Chapple
external usenet poster
 
Posts: n/a
Default

Nikos,

I have been using VBA for several years but still consider myself a
"getting started" customer because of my lack of knowledge.

When I get this macro working I will convert it to VBA.

Robin

On Wed, 04 May 2005 15:37:55 +0300, Nikos Yannacopoulos
wrote:

Hi Bruce,

A macro in this case, simply because the OP occurred in the
GettingStarted NG, and the question itself justifies the selection of NG
too... new users seem to feel more comfortable with Macros.

In my experience, the difference is that code provides far more
flexibility and control, at the cost of a higher expertise level
requirement. I think once you cross the line, there's no turning back!

Regards,
Nikos

BruceM wrote:
Just out of curiosity, why a macro instead of a VBA procedure? There seems
to be some difference between the two, but I have never quite sorted out what
it is.

"Nikos Yannacopoulos" wrote:


Robin,

Open the form in design view, and select the form object (Edit Select
Form). Display the properties window (if not already open) by Vew
Properties, select tab Events, place the cursor in the box next to On
Open and click the little button with the ellipsis sign (...) that
appears on the right; select Macro Builder, give the macro a meaningful
name (so you can tell what it is when you see it later) and add a single
action to it, GoToRecord, with argument Record set to New. Save and
return to the form. The job is done.

HTH,
Nikos

Robin Chapple wrote:

I have a form in datasheet view which when opened I need the focus to
go to a new record.

I already have a command "GoTo Field".

How do I do that?

Thanks,

Robin Chapple


  #8  
Old May 5th, 2005, 08:18 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default


Now this may be associated with the fact that the form is a sub form
with members called from a combo box on the main form.

Yes, that's what makes the difference! We have been using the Form_Open
event for a subform, which obviously only opens once, so the event won't
fire next time.
In light of the new information, you need to use a different event to
trigger the action, and thst's the combo's On Change event; since you're
familiar with VBA code, put this in the combo's On Change event:

Me.YourSubformNameHere.SetFocus
DoCmd.GoToRecord , , acNewRec

This should do the trick.

Regards,
Nikos
  #9  
Old May 5th, 2005, 08:21 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Bruce,

Though I'm still on A2K myself, I believe macros are still there in
A2K3, and for a good reason in my opinion: they provide a far easier
entry point to automation for the novice user... not everyone jumps in
the deep like you! I'd been using macros for a long time before I
jumped. Now that I have, i would also say that VBA is the way to go
(eventually), but for different reasons, not for discontinued support
(if that's the case).

Regards,
Nikos



BruceM wrote:
Thanks for the reply. A book I read when I was first using Access said that
as of Access 2000 VBA procedures were the way to go, although macro support
was still available. By using VBA procedures from the beginning I guess I
jumped in the deep end, but certainly not for the first time.

"Nikos Yannacopoulos" wrote:


Hi Bruce,

A macro in this case, simply because the OP occurred in the
GettingStarted NG, and the question itself justifies the selection of NG
too... new users seem to feel more comfortable with Macros.

In my experience, the difference is that code provides far more
flexibility and control, at the cost of a higher expertise level
requirement. I think once you cross the line, there's no turning back!

Regards,
Nikos

BruceM wrote:

Just out of curiosity, why a macro instead of a VBA procedure? There seems
to be some difference between the two, but I have never quite sorted out what
it is.

"Nikos Yannacopoulos" wrote:



Robin,

Open the form in design view, and select the form object (Edit Select
Form). Display the properties window (if not already open) by Vew
Properties, select tab Events, place the cursor in the box next to On
Open and click the little button with the ellipsis sign (...) that
appears on the right; select Macro Builder, give the macro a meaningful
name (so you can tell what it is when you see it later) and add a single
action to it, GoToRecord, with argument Record set to New. Save and
return to the form. The job is done.

HTH,
Nikos

Robin Chapple wrote:


I have a form in datasheet view which when opened I need the focus to
go to a new record.

I already have a command "GoTo Field".

How do I do that?

Thanks,

Robin Chapple

  #10  
Old May 5th, 2005, 08:23 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default


I have been using VBA for several years but still consider myself a
"getting started" customer because of my lack of knowledge.

I guess that makes you a rare exception :-)

Nikos
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
strategy for data entry in multiple tables LAF Using Forms 18 April 25th, 2005 04:04 AM
Goto specific record givr Running & Setting Up Queries 3 April 21st, 2005 01:11 PM
Prevent Blank Records being written. Need Help. Robert Nusz @ DPS Using Forms 4 December 29th, 2004 05:15 PM
Form drops edited record-inserts new record instead karenk10 General Discussion 0 September 22nd, 2004 10:19 PM
goto last record of a list box Phil Using Forms 3 August 20th, 2004 03:21 PM


All times are GMT +1. The time now is 11:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.