Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form with no new record button

Status
Not open for further replies.

5981

Technical User
Nov 6, 2003
10
US
I have created a form; however, I cannot create a new record. I can see the information that already exists in the database. I want to be able to type in new information. The create a new record button is not available. Can anyone help me with this, please?
 
Hi!

Form properties, data tab. You probably have 'Allow additions' set to no. If so, change to yes.

Roy-Vidar
 
I think what you what to do is set the form property Data Entry to YES
 
In Form property Data Entry is marked yes and allow additions is marked yes. Thanks! Any other ideas? :)
 
There might be a number of reasons. For some of us to be able to help, will need you to elaborate a bit more about the form.

How is it opened (code, dblclick, access generated switchboard), what kind ("stand alone", sub, having a sub), continous forms or single form, is the recordsource updatable...

(I often use 'Allow additions'=yes in combination with 'Data Entry'=no)

Roy-Vidar
 
The form is created from all of my tables. It is a new client form and it needs all of the information from all the tables. It can open by double clicking the new client form in the forms section or on the switchboard. I tried allow additons yes and data entry no and that did not work. All of my other forms have the option to create a new record; however, the form is made from the same table. Does this matter?
 
Hmmmm... "all of my tables" - not sure, but that might perhaps be it, that including all your tables (perhaps forgetting primary key/foreign key fields) in one form is preventing the recordsource from being updateable. (BTW on top you say all tables, in bottom only one? I'm assuming the first line is correct)

Would using comboboxes be an option in stead of showing all table information? Could you perhaps try using main/sub forms?

To experiment, you might try recrating the form with less information, and add it incremetally, to see at which level the form get's in 'Allow additions=no' mode (and avoid those fields, if some are found)

Else, I don't know. These are just suggestions based on the information given. If this doesn't help, perhaps someone else might visit this thread.

HTH Roy-Vidar
 
Good idea! I have been using the wizard to create the form but I should try adding each piece of info separately. I noticed that I cannot change any information either.
 
I can have two tables that I will be able to change informaiton and create a new record. It creats a form with a sub form. Is there anyway that I can have all the tables in one form? I tried to create a form in design view but it is not working. Can someone help please? I have taken a short class in Access. I know how to get around but I don't know all the shortcuts. Thanks for all the help! :)
 
Hi again!

Been offline for a while... Have you solved your problem?

The shortcuts are: having a good table/relationship structure and using main/sub forms;-)

Using main/sub form techniques are excellent for viewing and altering information in more than one table at a time thru forms. Using for instance lists and combos in addition, increases this functionality. I'll continue to recommend it!

Think you are kind of answering yor own question thru your testing. Adding controls to a form where the fields in the recordsource are comming from more than one table, often makes the recordsource not updatable. Some of the reason for this, lies in the relationships between the tables. The form needs to reflect this in some way (1:M Relatinships -> Main form/sub form).

Judging from "I have taken a short class in Access", I'd say at current level (no pun intended) there are no way of achieving all tables in one form, without subforms (and all the fields are updatable);-)

I hope I haven't discouraged you from using the form and report wizards! I think lot of/most of the members here, use the wizards as starting points for most forms and reports (at least I do), then tweak a litle to achieve whats needed. Bottom line, I think, is understanding the forms/reports recordsource (table/tables or query)

Enjoy Roy-Vidar
 
Hi there. I'm having trouble with enabling fields on a sub form when the user goes to a new record.

The form has several fields disabled to prevent users from accidentally altering existing records. The user has the capability to enable these fields via a check box that asks if they're sure they want to change the field. Once the field selection has changed on an existing record, I then ask the user to confirm via vbOKCancel. If the user cancels the change, the value goes back to the original value and again disables the field. Likewise if they click OK the field is disabled. I don't particuliarly like all of the messages, but that's the way the end-user wants it. These fields also have an "on double click" event that opens a form for data entry and I had to modify the event to "after update" instead of On Change because the Combo box list wouldn't allow the user to type anything without continuously prompting. Yikes. There's also enabling and disabling based on "Apply Filter".


Anyways, I think I have so many instances of enabling and disabling fields that I've inundated myself. The fields need to be enabled on a new record so that the user doesn't have to manually enable each field via the check box(es). I don't know where I should place the code...or if the code is accurate. Do I need to call out a recordset? Here's the lastest attempt.... Help. Thanks a bunch for any advice.


Sub NewRecordMark(frm As Form)
Dim intnewrec As Integer

intnewrec = frm.NewRecord
If intnewrec = True Then

Me.frmLogSub!chkUpdatePatient.SetFocus
Me.frmLogSub!NewProvider.Enabled = True
Me.frmLogSub!Patient.Enabled = True
Me.frmLogSub!NewClient.Enabled = True
Me.frmLogSub!FileNumber.Enabled = True
Me.frmLogSub!Neg.Enabled = True
Me.frmLogSub!Status.Enabled = True
Me.frmLogSub!State.Enabled = True
Else
Me.frmLogSub!chkUpdatePatient.SetFocus
Me.frmLogSub!Provider.Enabled = False
Me.frmLogSub!Client.Enabled = False
Me.frmLogSub!FileNumber.Enabled = False
Me.frmLogSub!Patient.Enabled = False
Me.frmLogSub!Neg.Enabled = False
Me.frmLogSub!Status.Enabled = False
Me.frmLogSub!State.Enabled = False
End If

End Sub



 
I'm so sorry about the above message. This is the first time I used this service and I goofed. My sincere apologies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top