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 |
#11
|
|||
|
|||
Nikos,
I supplied some wrong information. I am not using a combo box I am using a List Box and there in no "On Change" event. Is there another option please? Robin On Thu, 05 May 2005 10:18:16 +0300, Nikos Yannacopoulos wrote: 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 |
#12
|
|||
|
|||
I've settled this one by changing to a combo box and using your code.
Bingo! she's a good one. Thanks very much Robin On Thu, 05 May 2005 10:18:16 +0300, Nikos Yannacopoulos wrote: 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 |
#13
|
|||
|
|||
I've settled this one by changing to a combo box and using your code.
Bingo! she's a good one. Thanks very much Robin On Thu, 05 May 2005 10:18:16 +0300, Nikos Yannacopoulos wrote: 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 |
#14
|
|||
|
|||
Robin,
Sorry for the delay, I was away for a few days. Glad you worked it out. You could have done it just as well with the listbox, using the On Click event instead. Nikos wrote: I've settled this one by changing to a combo box and using your code. Bingo! she's a good one. Thanks very much Robin On Thu, 05 May 2005 10:18:16 +0300, Nikos Yannacopoulos wrote: 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 |
#15
|
|||
|
|||
Nikos,
Thanks for that further information. I will take that option because I like the way that the list box displays the list without the need for a click. Robin On Tue, 10 May 2005 10:44:17 +0300, Nikos Yannacopoulos wrote: Robin, Sorry for the delay, I was away for a few days. Glad you worked it out. You could have done it just as well with the listbox, using the On Click event instead. Nikos wrote: I've settled this one by changing to a combo box and using your code. Bingo! she's a good one. Thanks very much Robin On Thu, 05 May 2005 10:18:16 +0300, Nikos Yannacopoulos wrote: 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 |
|
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 |