Hi, im having a problem with shring my db over a networkt,
as far as i understand access 97 locks a page (2k) of records when a record is being edited,
does anyone know a way in 97 how i can get access to lock ONLY the EDITED record and not the page?
in Tools/Options/Advanced i have "edited record" locking clicked and each form locks only the record edited but its still locking the page, i know there is "record level locking" feature in Access 2002 but not in 97, is this possible?
I was wondering if what I'm trying to do in Access XP and 2003 is possible. I've looked at countless templates and samples and havn't seen anything like what I want to do to be able to construct it. I've tried manipulating queries, relationships different table joins but to no avail. I'm only a beginner in VBA and know little SQL, I would be truly gratefull if someone can please shed some light on the below.
I've been creating a preventitive fleet maintenance database in access and want to make some changes that will make the database more flexible.
What I have is a main form which has the following main fields from the tblWorkOrder; WorkOrderID, FleetID, StartDate, FinishDate, Odometer, and ServiceTypeID.
Within this I have a subform in datasheet view (tblServiceItems, fields; ServiceItemID, ServiceDescription, ServiceCompleted(checkbox)) and this lists all the service items that belong to the ServiceTypeID in the main form.
I have another table called tblServiceDetails and this has the fields WorkOrderID, ServiceItemID which join the above two tables.
My problem is that I can't get the subform to list all the records that are in the table tblServiceItems, it only shows each record if you go through and select it manually. What I want it to do is to show like a listbox and allow me to go through the list and check of those service items once they have been completed. On top of this I want all those service items for that service type to be recorded against that workorder (regardless of completed or not) so then when I create a report on a WorkOrder It will list all the service items showing the checkbox's of which services have been done.
I've tried to do this with a listbox, but It doesn't show the checkbox, only yes or no. I've also tried using the tblServiceItems as the subform but this only updated the table and didn't create a record in the table tblServiceDetails matching it with the workorder.
I have a main form that controls 2 subforms. sbfActiveProjects displays a list of records that have not been flagged as complete. Upon clicking on a record in sbfActiveProjects, the details of that record show up in sbfProject. This functionality works great, except when I try to create a new record. The code works fine for getting a new record, however once I run the command I lose my ability to navigate to other active records.
Code: Private Sub cmdNewProject_Click() 'set focus to sbfProject sbfProject.SetFocus 'navigate to new record DoCmd.GoToRecord , "", acNewRec End Sub
How do I display a more meaningful message instead of the cryptic error about having to enter data into blah blah blah. How can I trap that error and provide them a more meaningful message about entering data. I have tried the following;
Main form name frmPatientRecords Sub form name DentalRecords Subform Private Sub Form_BeforeUpdate(Cancel As Integer) If Nz(tblPatientDetails!recordid, 0) = 0 Then MsgBox ("sorry. Please complete the main record entry") Parent.SetFocus End If End Sub
I have an "Returns" master form that contains two subforms. The subforms contain items that we are returning back into our inventory. The underlying queries in each subform show only those records where the "Return Date" is null. The query(s) works fine, except that if there are 3 items that need to be returned there are 3 records that show in the master Returns form. I tried the Totals option in the query but the I need that Return Date on the subform. I only want one Returns master form to show the 3 records (not 3 records of the same master form).
Hi all Simple problem I'm hoping someone can help with. I have a form that is populated using a query that looks up a table called tblFleet. I can search the query results using a simple search function I downloaded from this site(See previous thread). What I would like to do now is display results from a linked table, tblVCR that match the fleet vehicle I select on the main form. I tried inserting a subform but could not get it to return any results. Do I need to create a separate query to return the reults into the subform or is there code that I need to add. As always, any help appreciated Regards Craig
Hi all Simple problem I'm hoping someone can help with. I have a form that is populated using a query that looks up a table called tblFleet. I can search the query results using a simple search function I downloaded from this site(See previous thread). What I would like to do now is display results from a linked table, tblVCR that match the fleet vehicle I select on the main form. I tried inserting a subform but could not get it to return any results. Do I need to create a separate query to return the reults into the subform or is there code that I need to add. As always, any help appreciated Regards Craig
Hello, I want to make a form with a conditional subform so that when selecting a specific value in one field, a specific subform appears.
I understand that it needs to go in the 'AfterUpdate' section of the field properties but I am struggling with coding it.
On the main form I have a Combo Box called 'Body System' (from the table '_Study') which can either be 'CV', 'PUL', 'Clinical' or 'CNS'.
When it is 'CV' I want to add the the subform 'Results CV' When it is 'PUL' - the subform 'Results Pul' When it is 'CNS' - the subform 'Results CNS' When it is 'Clinical' - the subform 'Results Clinical'
I would be very grateful if somebody could help me with the coding that I need to be able to do this!
Hello, I want to make a form with a conditional subform so that when selecting a specific value in one field, a specific subform appears.
I understand that it needs to go in the 'AfterUpdate' section of the field properties but I am struggling with coding it.
On the main form I have a Combo Box called 'Body System' (from the table '_Study') which can either be 'CV', 'PUL', 'Clinical' or 'CNS'.
When it is 'CV' I want to add the the subform 'Results CV' When it is 'PUL' - the subform 'Results Pul' When it is 'CNS' - the subform 'Results CNS' When it is 'Clinical' - the subform 'Results Clinical'
I would be very grateful if somebody could help me with the coding that I need to be able to do this!
I have a form with a subform in it and I would like to print the contents of that form to a report. I am able to print now, using a "print" command button, but it only prints one record, just the one that is being displayed. I want to be able to print a report with all the records that are in the filtered result.
Also, when the press the "print" button I would like to give them an option "Print this record?" "Print All records?". depending on the input, it would print the report.
Can someone please help me with this? Much appreicated. Thanks.
I want a user to be able to create a new record in the main form, after they have finished filling in the boxes in a subform by pressing the Enter key, rather than having to click the 'new record' button on the main form.
I reckon I need a 'default button' on the subform but I have no idea what this should do when clicked to create the new record...
I'm having difficulty controlling data entry to (disabling) a subform when a new record is being added to the parent form. I can set the subform to be disabled if there is no index value in the parent form (this allows the subform to function for existing records) but then the user has to create the parent record and move off of that record and then return to it in order to add child records to the subform. This is basically a create new records/data entry problem and I'm feeling pretty stupid. There must be a way to handle this...
Is it possable to create a sub form using a single table. I can create one using 2 tables but am not sure on how to or if it can be done using 1 table. All i can find in forum is about multiple tables.
When I click on the command button to create a New Record and then type the customer details in the Main Form and the Order Details in the Subform, the information is not retained
i.e. when I close the Form and then re-open the Form the orders details are not saved but the customer details are.
When I re-enter the order details the information is retained this time, everything seems work ok second time round!!
I am trying to create a database to manage IT assets, most of the structure is done, I'm now trying to get the details done.
The issue I am currently trying to tackle is to get a control button on one form to create a new record in the sub form that sits in the main form via another pop-up form.
So I have :
>PeripheralsViewForm - that has 4 control buttons (Edit Quantity, Edit Description,Add an Item and Exit)
>> PeripheralsSubForm - (Datasheet) which is referenced to PeripheralsQuery
The Edit Quantity and Edit Description open a separate form which allows the user to update only the quantity or description respectively (I have done it this way rather than allowing edits in the data sheet as I feel that it is too easy to hit a key incorrectly and overwrite data in the datasheet view) Both of these functions work perfectly (to my amazement) - I am using the id field in the subform to link to the pop-up form which then has unbound text input boxes, which I then write back to the subform.
e.g from edit button on click event: DoCmd.OpenForm "perquantform", , , " ID=" & Form.PeripheralsSubForm!ID and then from the pop-up form "perquantform" on the "Exit & Save" button I have :
This allows the user to select the record in the datasheet form and then click either the change quantity or description button.Also also the other reason I did it this way was because I just couldn't get the subform to requery when I had the two edit popups linked to the table or query.
The problem now is that when I click on the "Add an Item" button, it overwrites whatever record is currently selected !
The code I have is this:
From the "Add an Item" button on click action: DoCmd.GoToRecord , Forms!peripheralsViewForm!PeripheralsSubForm.Form! , acNewRec DoCmd.OpenForm "addperform"
And from the form "addperform" - "Save & Exit" button on click action:
the line "DoCmd.GoToRecord , Forms!peripheralsViewForm!PeripheralsSubForm.Form! , acNewRec" is what I have added to try to solve the overwrite issue, but when I run this it comes up with the error :
"runtime error 2498 - An expression you entered is the wrong data type for one of the arguments"
I have put this line in the "addperform" exit action and it comes up with the same sort of error.
I wonder if anyone can help. I attach a table that is a material list (27000 records). When I add a new material I want to be able to see the last part code I created for a particular supplier.
For example C001, C002 and C003 are for a supplier company called Chapters so I would scroll through the combo box search list in the form for the last one and create a new record called C004. The problem is that E00001, E00002 for a company called Edwards supplies 20,000 items so it's a long way to scroll through to create a new part code called E20001. How can I show in the form what the last part code is for each Supplier?
I attach the form and table as I'm not very good at explaining this, although I have had to delete approx 20000 records as the database was too big to be posted. Any advice/help would be greatly appreciated, many thanks
I have a database in which i keep track of my books collection. Amongst my tables i three of them are:
tblBooks - main books table tblKeywords - where i store keywords (such as "database", "programming", "web development" etc) tblBooksKeywords - to create a many-to-many relationship between the above two tables.
Now in tblbooks i have about 270 records (1 per book). Now for each book in this table i would like to create a record in the tblBooksKeywords table to add a the keyword "Computers" to each book.
i.e.
Book1 - Computers Book2 - Computers and so on till Book 270
Now rather than i do this manually for 270 records is there a way in which i can create these 270 records automatically ?
I'm trying to create a record for a table that has 2 attributes:
ContainsTracks +album +tracks
I have my main form, where the album is determined by a TextBox. My subform has a textbox that lists the tracks (in datasheet view). I have this set up and working fine.At the moment if I try to add a new record by typing a new entry into the subform I get the error: "Index or primary key can not contain a null value". This is because both album and tracks make the composite primary key of ContainsTracks.
My question is, how can I tell the subform to grab the value from TextBox1 in the main form as the +album when I create a new record.I have provided two screenshot that perhaps explain my predicament a bit better
I'm trying to create an invoice system with a sub-form within the main form. The issue I'm having is that the data in the sub-form keeps getting overwritten each time a new record is created for the main form. So when I go back to edit an older record, the data in the sub-form is changed to whatever the latest record had in it. Is there a way to lock in the data in the sub-form so that it stays with it's own record?
What i'm trying to do is add a new record to a subform. The problem is, I couldn't use a subform based on a table in order to achieve this. I needed extended information for it to be useful, so I made the visible part of the subform based on a query instead.I'd like to add a button that adds a new object to the main job. I'd like the adding of that button to call a new form allows you to fill in the information for that object (this called form actually contains 5 subforms to populate all the data of the object). That form works.
What I need is for the button to call the 2nd detailed form AND create the necessary entries in the project/object junction table.The idea as it is now is a button on the main form, but if it was possible to do so via continuous form in a subform, that's doable.
I think this is a pretty simple thing, but for some reason I'm lost.
I need to add a number of records to a table.
The user would input a starting record number and ending record number (ie 60000, 60003) and access would create those records with the record number field populated with all the values, in other words, it would create 4 records 60000,60001,60002, and 60003
any ideas how this can be done? I'm thinking a query, but it might require coding of a for...next loop???
I have two records for a list of employees: start date and end date. I want to create a query for the top 5 employees who have been employed the longest (and are still currently employed, so end date should not exist for the top 5). How should I go about this using a top values property? thanks.
I have a simple database with 2 tables, students and progress. I need to set up my database so that when I create a new record for a student (using a form I've created) it automatically creates 4 new entries in the progress table using the ID I have generated in the form and a task number (1-4) for each of these entries.
Additionally, once all tasks are set to complete = true, I need to set the field "all tasks complete" to true. I'd like to do this all without vba if possible.