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
|
|||
|
|||
New Record Button
Hello
I want to add a button to my switchboard that, when clicked, opens up a blank record. Currently, I have to click on the button that is used to "edit" a record and then click on (at the bottom) the * at the bottom of the edit screen to create a new record. I hope this makes sense. I'd appreciate any suggestions. |
#2
|
|||
|
|||
New Record Button
Hi storlogic,
You are using a form for inputting your information correct? I would think you would have a button on your switchboard to open your form. If so, open your form in design view, open the forms properties, scroll down to On Open event, select Event Procedure from the drop down and click on the three dots (...) and place this in above the End Sub DoCmd.GoToRecord , , acNewRec When you click the button to open your form, the form should open on a new record. "storlogic" wrote: Hello I want to add a button to my switchboard that, when clicked, opens up a blank record. Currently, I have to click on the button that is used to "edit" a record and then click on (at the bottom) the * at the bottom of the edit screen to create a new record. I hope this makes sense. I'd appreciate any suggestions. |
#3
|
|||
|
|||
New Record Button
Go into the switchboard Manager (Tools - Database Utilities - Switchboard
Manager), once this opens, double click the "Main Switchboard (default)". Select New. Enter a name (this will be shown on the switchboard), from the Command field choose "Open Form in Add Mode" and then choose the form. This will make it so they can ONLY add a new entry. I would recommend adding another option to the switchboard to open the form in Edit mode so that the data can be looked at. "storlogic" wrote: Hello I want to add a button to my switchboard that, when clicked, opens up a blank record. Currently, I have to click on the button that is used to "edit" a record and then click on (at the bottom) the * at the bottom of the edit screen to create a new record. I hope this makes sense. I'd appreciate any suggestions. |
#4
|
|||
|
|||
New Record Button
Stockwell43 wrote:
Hi storlogic, You are using a form for inputting your information correct? I would think you would have a button on your switchboard to open your form. If so, open your form in design view, open the forms properties, scroll down to On Open event, select Event Procedure from the drop down and click on the three dots (...) and place this in above the End Sub DoCmd.GoToRecord , , acNewRec When you click the button to open your form, the form should open on a new record. "storlogic" wrote: Hello I want to add a button to my switchboard that, when clicked, opens up a blank record. Currently, I have to click on the button that is used to "edit" a record and then click on (at the bottom) the * at the bottom of the edit screen to create a new record. I hope this makes sense. I'd appreciate any suggestions. I would add mo Me.AllowAdditons = True DoCmd.GoToRecord , , acNewRec me.firstFieldName.setfocus then set the tab order That way when you click on the button it will also set the focus you want. I also put this in the "on exit" of each field to lock it so users don't make accidents. Me.AllFieldNames.Locked = True Could put all of these in the forms "On Load" and just click a save button that closes and opens the form. Add this to the forms "on load" too to stop accidents by users. ME.AllowAditions = False One more step. If you are using a primary key that must be entered, In the "On KeyPress" of each field name: If IsNull(Me.MyPrimaryKeyField) or Me.MyPrimaryKeyField) = "" Then MsgBox "There is no Primary Key entry. Enter one please." Docmd.cancelEvent Goto Exit1 End If Exit1: I also would add this to the Primary Key Field on Click. Me.AllOfMyFields.Locked = False That way if users need to edit any mistakes they can just click and go for it. This will stop the Primary Key violation when users accidently enter a new record and add some unwanted data with no primary key entered. This was a pain for along time but no longer. You can use the Esc Key to get out, if you can get the user to find the Esc Key that they never have used before. I had many hours of communication with this one. Can you see the keyboard? Yes Do you know your left and right hand fully? Yes Is your keyboard black? If they say yes, I know that they can see the keyboard. Can you see the Esc Key on the top left of the keyboard? No. I'll be in your office within the hour! When you click the New Record Button. Halalluia.......Magic! |
#5
|
|||
|
|||
New Record Button
Thank you to all !!! I'll give this and the other's above a try and see
which one I like best. Thanks again for your suggestions and prompt responses. "Sninkle" wrote: Go into the switchboard Manager (Tools - Database Utilities - Switchboard Manager), once this opens, double click the "Main Switchboard (default)". Select New. Enter a name (this will be shown on the switchboard), from the Command field choose "Open Form in Add Mode" and then choose the form. This will make it so they can ONLY add a new entry. I would recommend adding another option to the switchboard to open the form in Edit mode so that the data can be looked at. "storlogic" wrote: Hello I want to add a button to my switchboard that, when clicked, opens up a blank record. Currently, I have to click on the button that is used to "edit" a record and then click on (at the bottom) the * at the bottom of the edit screen to create a new record. I hope this makes sense. I'd appreciate any suggestions. |
#6
|
|||
|
|||
New Record Button
This is exactly what I was looking for. Thank you so much!
Cheers "Sninkle" wrote: Go into the switchboard Manager (Tools - Database Utilities - Switchboard Manager), once this opens, double click the "Main Switchboard (default)". Select New. Enter a name (this will be shown on the switchboard), from the Command field choose "Open Form in Add Mode" and then choose the form. This will make it so they can ONLY add a new entry. I would recommend adding another option to the switchboard to open the form in Edit mode so that the data can be looked at. "storlogic" wrote: Hello I want to add a button to my switchboard that, when clicked, opens up a blank record. Currently, I have to click on the button that is used to "edit" a record and then click on (at the bottom) the * at the bottom of the edit screen to create a new record. I hope this makes sense. I'd appreciate any suggestions. |
Thread Tools | |
Display Modes | |
|
|