How Create Form That Allows You To Edit But Not Add New Records.
Mar 30, 2006
I guess this is a fairly basic one. I have a form that allows people to edit records, but I want to prevent people from adding new records on this form. I thought that if I put 'no' in the 'Allow additions' property, I would achieve this end, but when I do this, all the input boxes dissappear.
appreciate help
thanks
View Replies
ADVERTISEMENT
May 13, 2014
I am trying to create a form to enter data in a table. I would like to make it pull in info from a switchboard. If the record already exists I would like it to find it and allow me to edit the info. If the record doesn't exist I would like to be able to add a new record with the data input. What is the best way to accomplish this?
View 1 Replies
View Related
Aug 27, 2013
What is the best way to capture the users that modify the records in the database?
Let us start from User Log-in Form After log-in, Main Form will open The main form has various menu (example Add Customer) Once I open the "Add Customer Form", I want to record the username in the Createdby/Editedby Field automatically.
View 5 Replies
View Related
Mar 11, 2008
I have the following code on a combo box in a form that creates a new record in the table Products if it doesn't already exist:
Code:Private Sub comProduct_NotInList(NewData As String, Response As Integer) Dim strSQL As String 'Exit this sub if the combo box is cleared If NewData = "" Then Exit Sub strSQL = "Insert Into Products ([Product]) " & _"values ('" & NewData & "');" CurrentDb.Execute strSQL, dbFailOnError Response = acDataErrAdded End Sub
It creates a new record and inputs the appropriate value into the Product field, however then it goes to the next record and when I try to edit other fields, it does so on a new record.
So, for example, I wanted to set the Product field to ProductA and the Brand field to BrandB and the Size field to 200, it produces two separate records like this (code box used for formatting):
Code:Product | Brand | Size |ProductA BrandB 200
View 13 Replies
View Related
Oct 4, 2006
Hi,
I've searched a lot and couldn't find an answer to my problem.
I want to have a field in my form that allow me to paste an image from the clipboard to, for example, a Paint field. Then, I want to save that image to a file on a specific folder in my computer via VB.
The reason for this is that I don't want to ask the user to open paint by himself and save the file, probably in the wrong location and with the wrong name.
The first approach was creating an OLE Object directly from the Insert menu and that worked partially. It allowed me to paste the image but there wasn't a way to save it to a file, neither a method for that. It was an incrusted object, and I think that is the reason for that.
Then I tried to create the object by myself via VB, with the instructions:
Dim objeto_perfil As Object
Set objeto_perfil = CreateObject("Paint.Picture") 'IT STOPS HERE
And with the variation:
Dim objeto_perfil As Object
Set objeto_perfil = CreateObject("Paint") 'IT STOPS HERE
And neither worked. The error message says it lacks an object.
Then I followed an example from msdn that used a bound frame (view here (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaac11/html/acproClass_HV05187062.asp)). The code is:
visor_perfil.Class = "Paint.Picture" ' Set class name.
' Specify type of object.
visor_perfil.OLETypeAllowed = acOLELinked
' Specify source file.
visor_perfil.SourceDoc = "C:RealPathimage.BMP"
' Create linked object.
visor_perfil.Action = acOLECreateLink 'IT STOPS HERE
' Adjust control size.
visor_perfil.SizeMode = acOLESizeZoom
It stops in the action assignation, an says "error 2753 there was an error trying to communicate with the OLE server".
I google a lot and could find much of the Paint.Picture Class.
Anyone has any ideas to overcome this issue? What am I doing wrong?
Thanks in advance!
View 3 Replies
View Related
Dec 12, 2014
I have a form which needs update ever month. When the form is opened, the end user can see the old records and data, and also a new record is added for any new data. I want to protect the old saved data and the user can only add, edit, or delete the new data in the newly added record. The problem is once a user adds the new data and moves to another record or another form, then he/she cannot edit or change the new data in case if there is any mistake or need to change something after couple of minutes.
I changed the Form Data Properties "Allow Additions", "Allow Edits", and "Allow Deletions" many different times and situations to solve this problem but with no success. I tried the following with NO success too: One of the Fields of the Record is (Month). In the Data Properties, I set a Default Value for this field as(December 2014) for instance. I set the Data Properties "Allow Additions", "Allow Edits", and "Allow Deletions" to (Yes). Then I put the following code in the Form's Current Event:
Private Sub Form_Current()
If Me.month.Value = "December 2014" Then
Me.AllowAdditions = True
Me.AllowEdits = True
Me.AllowDeletions = True
[Code] ....
View 3 Replies
View Related
Feb 8, 2006
Hi, I have a form where i would like to bring up various records for editing. This part is not a problem. BUT. If a user accidentally changes something and doesn't know what it used to be then i need to have a "cancel" button which will undo the edit so to speak. I am not sure of the best place to do this ?
View 4 Replies
View Related
Apr 2, 2013
I have the logical process, but I just don't know how to put it into code.
I have a form with two boxes HireMovieID and HireCustomerID, with a button HireButton.
The two tables which I have are CustomerInfo and MovieList.
Here's the psuedocode for what I need to happen:
Code:
IF HireMovieID.Genre = "R16"
(IF DOB > Today - 16 years)
Display Error: "Too young"
ELSE Hire()
[Code] ....
I need to somehow make it so that the MovieID is valid, as in, if it doesn't exist then it comes up with an Error MsgBox.
View 4 Replies
View Related
Aug 21, 2012
I am creating a data base to handle access requests to a building. All has gone well so far and ive built tables, reports, forms and used queries. However now im trying to get abit more clever and ive hit a bump of understanding/apprach.
Whilst a ninja in Excel, im still working out which is the pointy end in Access.
The database holds all details of access requests inc: Company attending, Individual attending, Access Levels and Period of attendance. This is all done with forms for the users and functions beautifully (ish).
I can run reports on this data, based on queries (there is much more included than above but you get the idea) and generate all the reports I need.
What I wanted to do was add, following attendance to the site, the card details of the AC card they were given for the visit.
My intention was to have a form with three variables: a combobox that would let you select the individuals company and two text boxes to select a date range in. Leaving just say three or four people from that company on that day rather than everyone who had ever atteneded to sort through and add the card details.
The combo box comes from another query that gave me individual company names from the main table.
I thought a date query (as in placing a more than <> or less than criteria vs textbox value on form in the query build section) could be added but I hadnt got that far.
It seems what I have done works backwards (oops), I can adjust the query from the form but get every record in the table on the form to click through to add card details, which will be abit rubbish when i have 1000's of requests building up in the history.
View 3 Replies
View Related
Aug 23, 2011
I have an Access 2010 database that I have split. In the database I have a couple tables, forms and two reports. I have entered some data into one of the tables, but when I go to edit the data in the form the next time, there is no data (though I have verified that there is data in the table). Also, there are two reports that can pull the data without any problem.
Why the data wouldn't show up in the form.
View 3 Replies
View Related
Mar 28, 2005
Hello! All,
I need to store a customer signature in the database so that we can take a print out at a later time.
I don't know how to go about doing this and thought that creating and editing an image within an access form should be a good option. But I don't know how to go about doing that either. So could anyone please help with this and also if you have a better idea, could you suggest that too. I have the application running on a tablet PC so there's something called Stickynotes too that comes with it. It would be great if someone could suggest a solution
Rishi..
View 2 Replies
View Related
Dec 11, 2004
I want to create a new word doc, do a saveas to a specific path and file name, allow the user to edit the new doc, and then close it and return to the Access app. I can create the doc but Word opens without opening the New Savedas Doc. using this code
Dim oApp As Word.Application
Dim WordDoc As Word.Document
Set oApp = CreateObject("Word.Application")
Set WordDoc = CreateObject("Word.document")
oApp.Visible = True
WordDoc.SaveAs ("TS-" & Me.Scriptnum & ".Doc")
Your help is appreciated.
View 1 Replies
View Related
Sep 2, 2013
I am trying to create a duplicate of a certain record in a table so that the user can then edit the new record - or old record even as it doesn't matter - as long as one of them is original. The idea is that any revisions / changes are stored the user may of made.
View 2 Replies
View Related
Feb 3, 2014
The user will be creating a new project that contains a bunch of releases. The releases have standard names which are stored in a table tbl_ReleaseNames It should be noted that the list of names is not static.
The user selects which of the releases pertains to their project and then based on their selections, new records would be created in tbl_RFP_Release and then a subsequent form would open where it would display each of these newly created releases where they could enter additional information. I thought of creating an unbound checkbox associated with each of the standard names, and then checking to see if the checkbox was checked and then creating the new records followed by opening up the new form.
View 6 Replies
View Related
Nov 18, 2004
Can someone direct me as to the most efficient way to add records to a table from a form? I have a table of members and a table of invoices and want to automatically create an invoice for each member by clicking a button on a form. Is there a way to do this using a macro, query, or do I write it in VBA?
Thanks much!
View 6 Replies
View Related
Mar 19, 2014
I've developing a QA/QC database for testing chemical products and I'm stuck on the best way to continue with adding multiple records by using one form.
I have two tables:
tblProductSpecs with two primary keys, "ProductName" and "TestName"
tblResults with three primary keys, "ProductName", "TestName", and "LotNumber" and a number field named "Value"
A product can have multiple tests associated with it, e.g:
ProductName - TestName
XXX - Density, pH
ZZZ - Density
YYY - % soluble, cloud point , freeze point
This is my tblProductSpecs table
I want to store the "Value" of each "TestName" of the "LotNumber" of that "ProductName" in tblResults by a form. (All TestName values are number values).
I want a form where I can select "ProductName" and have the "TestName"s displayed for that "ProductName". Then I want to store the value of that "TestName" for that "ProductName" and "LotNumber" in tblResults.
The problem is that each test per product per lot number is a record and I can't figure out a way to create multiple records from one form.
View 14 Replies
View Related
Feb 27, 2006
So, I've been searching through this forum and can't seem to find the answer to this one. I would like to capture a value from a main form and have it used as a value in an append query, in order to populate a subform based on the main form, like so:
INSERT INTO tblTakenSurveys ( VisitID, SurveyQuestionID, ResponseCodeID) SELECT Forms![frmMyFormName]!VisitID, tblSurveyQuestions.SurveyQuestionID, 66
FROM SurveyQuestions WHERE SurveyID = 3;
Might help to explain some of the terms in this statement:
tblTakenSurveys is where I need the new data to be entered via the subform.
Forms![frmMyFormName]!VisitID is a textbox control bound to a PK in another table that has a one-to-many relationship with tblTakenSurveys.
tblTakenSurveys.ResponseCodeID is a foreign key that represents respondents actual answers to questions.
66 is a value for a ResponseCodeID that stands for a dummy value meaning "data not yet entered"
As per advice I received from others on this forum, I have set a query like the above to run from a command button to populate the subform (in theory). But I'm sure I've done something wrong within the query because it will not return a value from the form "VisitID" control and therefore will not append the rows. Without the appended rows, my subform will not populate. And this has me running in circles...
I pasted the link to another thread below, where I originally received a lot of input as far as the table structure. I did not start this one, but my posts are the most recent (as of now anyway). Pat Hartman had given me a lot of the guidance here.
http://www.access-programmers.co.uk/forums/showthread.php?t=100176
View 1 Replies
View Related
Oct 23, 2013
I have a continuous form based on a 'start date' - 'end date' query. I would like to be able to select certain records from this form to print.
I have added a 'print' field and have created a new query including this parameter which a report can be based on but when i run this report I am, of course, asked for the original 'start date' and 'end date' again.
Is there any way of linking the command button to only the records on the current form?
View 1 Replies
View Related
Jul 28, 2014
How to create a message when no records are found from a form to a query in the report.
Example; Donations From Great Britain have no records
View 4 Replies
View Related
Mar 4, 2014
I have a main form [Job Quote Form 10-2205] and I am trying to add a command button to open up [Job Process Form-MKD] and have the [Job Process Form-MKD] open up and only show the records that match a certain field, in this case what I call "JobTrackNo" in the [Job Process Form-MKD]. (see attached .jpg)
This problem started to happen only recently, namely you will see that the left column under [Job Quote Form 10-2205] is blank, where normally there had been a number of fields to choose from. The fields are all still available, they are just not opening when I try to match two fields.
View 2 Replies
View Related
May 5, 2015
I am trying to create a query that takes values from a search form and provides records. I was having issues with getting results when some boxes on the form were left blank. I found a solution to that and it worked with a small number of fields. However when I make the full form query (about 8-10 fields) and run it says the query is too complex. I wrote the sql as I could not get designer to do what I wanted. Attached is the sql that works and that which is "too complex".
View 9 Replies
View Related
Jun 3, 2013
I would like to create a multi-select list box for all the records in an access 2010 form.
View 2 Replies
View Related
Aug 14, 2006
I've created a form that contains two subforms. Subform1 is a datasheet, subform2 is a regular form containing a subform (subform3) of it's own which is a datasheet.
Subform2 is linked to display detail information based on subform1...which works fine. Subform3 is linked to subform2 displaying additional details. When I open the master form everything displays ok and subform3 displays the correct information, but when I click on one of the records to edit it the form refreshes about 5 times and then record 1 in subform3 gets selected. In other words, I am unable to select any other record except record 1 in subform3 and thus unable to edit the records.
I have subform3 set to allow edits, additons, deletions and when I open subform3 by iteself I am able to edit/add/delete just fine.
This would all work fine if I did not need to edit subform3...all the links work perfectly and display's correct information. I am stumped. I hope I am missing something obvious.
Thanks.
View 7 Replies
View Related
Dec 8, 2006
Hi i have a shared database and have a form with a string of records. Each record has its own unbound checkbox and I want to make it so you can select multiple records, then be able to hit a button on the top of the form to edit certain fields of the records selected. Please keep in mind that this is shared by 10 users, therefore a linked yes/no field would cause problems between the users.
View 2 Replies
View Related
Dec 31, 2013
I have a query that selects records based on certain flags in each record. I can view the record in datasheet view, but I need to be able to edit the records selected by the query using another form. Is there any way to automate this process?
View 14 Replies
View Related
May 25, 2014
I have two table. Table 1 (assets) list all my assets etc. Table 2 lists all servicing for each asset.
I have a form which generates a list box of items that require servicing (once servicing has been completed on these items) I would like to update all records, in both tables. Table 2 with all the information about the service. and Table 1 with (only) the next service date.
I have set the list box to allow multiple selection and have used the following code to allow new records to be update in table 2 (which works). but I cant seem to get the code to edit one cell in table 1.
private Sub Command59_Click()
Dim strSQL As String
Dim db As DAO.Database
[Code].....
View 4 Replies
View Related