Hi I have a subform with several records entered. When a particular entry is made in the subform eg. chocolatebiscuit I want the subform to not allow any more entries - records in that particular subform Is there a easy way to do this?
I have tried to do this by saying Me.Form.allowadditions = false
Unfortunately this works on the whole form and stops the next subform - belonging to the next main record from adding a new record. How do I restrict the new records in A particular subform?
I tried Me.Form.allowadditions = true on entering the subform
but it doesnt work every time.
Also i put on enter if not chocolatebiscuit then allow entries but for new records it takes the last entry in the subform which could be two records back in the main form says yes there is a chocolatebiscuit and will not allow a new record.
I was just wondering if it was possible to set the Allowedits setting to false whenever someone moves to a new record.
I currently have Allowedits = No by default on form open, and an "Edit" button which sets allowedits to Yes. However, I want the form to go to Allowedits=No again when the user scrolls to a new record.
Also, is there a way to set the form so that if someone makes changes to a record, the change doesn't automatically save unless you press a save button.
Hi, I have a form "A" with a subform "B". The Subform allowadditions is set to no, however, I would like the user to click a button which is located on form "A if they like to add a record to the subform "B" but I keep getting an error!
The code for the button on form a is the following: Forms!a!B.AllowAdditions = True
I've got a main form (mainform1) and a subform (subform1). On the mainform, I have a listbox that is limits the user to choosing only 1 choice. The selected choice has an accompanied value - 1 through 6 - that is populated in a hidden textbox (txt1).
What I'm trying to do is to limit the number of records the user is allowed to populate based on the value in the textbox. I'm unable to reference the textbox value for some reason and i'm stuck. However, my code works when i enter an integer value, I.E.
Dim rst as object Set rst = Me.RecordsetClone If rst.RecordCount >= 2 Then Me.AllowAdditions = False
The code that i currently got going to reference the textbox that doesn't work is
If rst.RecordCount >= Me.Parent!txt1 Then Me.AllowAdditions = False
I've a quick question. In Access, I have a form that allows user to add new record into a table. Is there anyway of finding whether the new record has successfully been inserted or added?
So i think it may be wise to have a message to notify us of whether it's inserted successfully or not.
Can someone please tell me why I might be adding a record everytime I open my database. I have to forms that work from querys if I open the main form all is well , if I open the other oone first and then the main form I find a record has been added. Most annoying! :(
I have a table of vacinations and need to add a new record every time an animal is vacinated. I have created a form with all the fields in the table in it. But when I open it it takes me to the first record. I have had to add a button to the form to add a new record. This button then takes me to a blank form where i can input data. This is very messy and not very user friendly. Any suggestions on how i can tidy this up would be appreciated greatly.
I have looked on here for hours and cannot find anything, perhaps someone can help. I have just converted from 97 to 2003 and now I cannot add new records to my forms. I have checked that the allowAddtions property is set to Yes but the New record icon and menu option is grayed out. I have looked through all the form settings and I can't see what it might be.
I have a form that has a list of textboxes linked to table properties, and a subform linked to the same table. I used the command button wizard to create an add record command, but when i click on it it comes up with:
You cant go to the specified record You may be at the end of a record set
i have checked the properties on the forms and querys and set all data entry to yes What should i do?
I have a form that has a list box with events in it. On the same form I have two combo boxes, each with the same information; officials names. I added a subform to form1 and I want this form to store and display the information that is chosen(officials and events). How do I make this happen? It seems easy, but I just can't wrap my finger around it.
When adding a new record via a form, how do you make the 'new' record become a 'proper' record? I.e., add the record to the table? I know it is added when you exit that particular record on the form but I would like to update the table with the details of the new record without exiting the record on the form. I had always assumed this was done with the save command but this does not work.
I'll start with the general question ... I am using code to grab a file name from a local drive and waat to create a record with the detail of the file. what code will enable me to grab the file name from a loop function and stuff the value in a table. i have tried
[code] DoCmd.GoToRecord , , acNewRec
it does not add the file name store in a variable MyName in the table tblFiles in the field txtFileName i have designated nor does the code create a new record. what am I missing - is there a good reference for this?
I have 2 tables and a query to show the details of both tables on a form for an attendance database. The idea is that whenever someone is absent they have a record created.
tbl[Staff] has the following fields StaffID,Name,Team,Job Title tbl[Absence] has the following fields StaffID, abStartDate,abEndDate,abIssue
I can set up the query to find the member of staff by name but I want to be able to use this form to add new records to the Absence table for each individual. eg I use the query to search for "Joe Bloggs" and the form shows the details from staff table and then use the form to add details to the Absence table.
Hi to all! I face the following problem: I cannot add amounts per line! I have one table consisting of many different columns (fields), some of them having amounts. I want to update this table by doing the following: let's say I have the following records: 1/6/2006 A 12 1/5/2006 B 20 15/6/2006 C 21 22/6/2006 D 17 25/6/2006 E 30. I want to use a filter (e.g. the date being between 1/6/2006-30/6/2006), sort the records descending according to the amounts and then add in another field of the table A, B or C, according to whether the total amount including the specific record is above 70% of the total or above 90% of the total. In the specific example I want the following result: 25/6/2006 E 30 A 15/6/2006 C 21 A 22/6/2006 D 17 B 1/6/2006 A 12 C Their total amount is 30+21+17+12=80 and the percentage of each record is: E:0.375 , C:0.2625 , D:0.2125 and A:0.15. Their adding percentage is E:0.375 , E+C:0.6375 , E+C+D:0.85 and E+C+D+A:1. How can I do that? I calculate the percentage of each record in a query, but how can I calculate their adding percentage, so that I can use an if-clause in an appending query? Please help!! Thanks in advance for your time
I have two related tables - one is study information and one is person information. For each study, a person is assigned. On my form, I have a combo box to choose a person to add to a study. This works fine when the person exists already. To add a new person, I have an "add" command button that brings up a form to add a new person to the table. Problem is when I close the form, I'd have to find the person in the combo box to add them to the study. Is there a way to add a "person record" to the person table and when I return to the study form, have that new person already associated with the study? I don't allow users to edit the person info from the study form (the same person may be associated with different studies). Any ideas to help? Thank you.
I have 2 tables and a query to show the details of both tables on a form for an attendance database. The idea is that whenever someone is absent they have a record created.
tbl[Staff] has the following fields StaffID,Name,Team,Job Title tbl[Absence] has the following fields StaffID, abStartDate,abEndDate,abIssue
I can set up the query to find the member of staff by name but I want to be able to use this form to add new records to the Absence table for each individual. eg I use the query to search for "Joe Bloggs" and the form shows the details from staff table and then use the form to add details to the Absence table.
Hi, I'm fairly new to access but have some vb experience. Here's my situation. I have 1 combo box and 1 textbox. The combo box selection determines the textbox value. I made an if statment that determines what the value of the text box will be according the the combo box selection in the afterupdate of the combo box. The problem is when I want to view another record the textbox value equals whatever the last record was. So basically the combobox selection changes all the records. Like I said I am new to access and I find this odd. Any help would be greatly appreciated.Thank you
I'd like to create a combo box that is not limited to the list of records from a table, but allows the user to add to the table by typing into the combo box. I believe I write this code in the "after Update" event, but I'm not sure of the syntax. Can someone help?
The combo box is simply displaying the records from another table...so the code would add a record.
am using VB to check for an id if it is a new record. i have a message that pops up.
If IsNull(Form_myform![ID].Value) Then response = MsgBox("You have not entered your ID. Do you intend for this to be a record?", vbYesNoCancel, "id check")
but how do i get it to not enter the record into the table if no or cancel is clicked?
I am creating a form to add records to my database. I have created a primary key that is not autonumber. When adding a new record, I want the form to put a primary key default value of the next number in sequence. How do I do this?
I would like to add a value that i choose from a combo box to a table by clicking a button after selecting it from the combo box, and i do not know how to do it?
i have a little problem, at least, i think it is little. Within my access db form i have made a combobox for searching a number. When selected the applicable information will be shown in the detail part of the form.
I made a button in the detail section, to allow people to change the information.
However, after i placed the button with the allowedits = false and true part to autorise if people may or may not change the information, the combobox for searching a number only works when i first press the button [change] (so that the property is set on allowedits = true), then search the number by the combobox. Directly after that the combobox is not allowed to be used(!?)
What do i want? - combobox is allowed to be used always - information in detail section only is allowed to be changed when pressing the [change] button.
I am not sure how to do this, please help me if you want? :confused: