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
|
|||
|
|||
Save n Refresh New Form
Hi All,
I have use the 'Save' command button in the access2000. However, I need additional function when I click the 'Save' button. Click 'Save' - 'Yes' -- Save the data and then refresh into new form with the Log Number(Primary Key) increase to the next number No issue on the 'No' function. Pls help. Thank you. Private Sub SaveData_Click() On Error GoTo Err_SaveData_Click DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 Exit_SaveData_Click: Exit Sub Err_SaveData_Click: MsgBox Err.Description Resume Exit_SaveData_Click End Sub -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200703/1 |
#2
|
|||
|
|||
Save n Refresh New Form
On Mon, 26 Mar 2007 07:49:42 GMT, "Vesta via AccessMonster.com" u32018@uwe
wrote: I have use the 'Save' command button in the access2000. However, I need additional function when I click the 'Save' button. Click 'Save' - 'Yes' -- Save the data and then refresh into new form with the Log Number(Primary Key) increase to the next number The Form Wizard is using really old, obsolete toolbar code. There are better ways! Try Private Sub cmdSave_Click() DoCmd.RunCommand acCmdSaveRecord DoCmd.GoToRecord acDataForm, Me.Name End Sub This assumes that the Log Number is an Autonumber field - if it's not post back, and explain what you want to happen (in particular what you want to happen when the user is done entering data!) No issue on the 'No' function. I have no idea what you're talking about here. John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|