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. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |