Question create button to link to create new record

mimie

Registered User.
Local time
Yesterday, 23:37
Joined
Jul 4, 2012
Messages
10
Hi,

Im creating a database in access 2007. Im stuck and I hope someone will help me ASAP.
I have got a main menu. 2 buttons are included.
1 button go to a form to create a new company data.
1 button go to a form to edit company data.
The link work, I mean when I click in the button Im going to the form wanted.
But, I cant manage to have a new record or to edit the details in both form.
When Im in the next form, im just stuck on a record. I cant edit.
In the form new_company I add soem button (with command button wizard) call new, save and delete. But there are not working as well. I have got a message saying "I can't go to the specified record" for new. for save or delete the message is "the command or action 'save record' isn't available now".
In the property on a form the data entry in data is yes. im trying to add a VBA in event on open but its not working as well. I supposed I have got the wrong VBA code.
Im fairly new in access 2007, please.. help :banghead:
thank you
 
If you want to open the current record in a new form have a look at the WhereCondition portion of the OpenForm method, to control whether you are able to Edit or Add new records on the form check out the AcFormOpenDataMode of the OpenForm method.
 
Last edited:
For a NEW RECORD you have got a NAVIGATION BUTTONS on the form.
If you want a COMMAND BUTTON for this look at "DemoGoToNewRecA2000.mdb". (attachment, zip). Open Form and try. Look at VBA.
 

Attachments

John Big Booty,
please can you tell me what should I put in Wherecondition. what is the function ? I never used that before.
Openform is :
docmd.openform stdocname, , , , acformadd.
I dont understans why its not working...
:banghead::banghead::banghead::banghead::banghead:

MStef,
My database is more complicated because I have got a list of company and a list of communication.
So I need to be able to add or edit a company but as well I need to be able to add or edit new records of communication.
So for example, when I create a new company I would like a button to go strait into a new record of communication with the name of the company just add.
Is it understandable ?

Hope so..
:confused:
 
Try to do this vai COMBO BOX, (not a command button).
 
What do u mean by a compo box ? witch field ?
I dont understand
sorry im not an expert..
thanks
 

Users who are viewing this thread

Back
Top Bottom