Subform Not Creating Records

Nov 11, 2004

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?

thank you

Scott

View Replies


ADVERTISEMENT

Subform - Datasheet Creating/updating Records

Jul 6, 2007

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.

Any idea's please...

View 13 Replies View Related

Modules & VBA :: Creating New Record Within Subform - Cannot Navigate To Other Active Records

May 4, 2015

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

View 2 Replies View Related

Modules & VBA :: Data Entry - Subform Creating Orphan Records

Feb 13, 2015

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

View 14 Replies View Related

Forms :: Underlying Query In Subform Creating Duplicate Records On Form

Jun 18, 2014

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).

View 5 Replies View Related

Creating A Subform

Nov 25, 2005

hi guys this is my problem : might be a bit long but here it goes!
tbl 1:
ServiceRecord_ID
veh_no
date in
date out
status

tbl2:
Employee_id
ServiceRecord_ID
task date
action taken
spare parts required
Part_Id

tbl3:
PO_no
part_ID
price
quantity


now i want to create a form to input the datas into tbl one

the layout of the form looks like this

ServiceRecord_ID
vehicle no
date in date out
status

subform:
task history

employee_id task date parts action taken parts required

in the subform , the end user can just input the task history into the subform.

So what are teh steps that i must take>?

View 1 Replies View Related

Creating A Subform

Jun 19, 2006

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

View 1 Replies View Related

Creating A Subform

Jun 19, 2006

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

View 1 Replies View Related

Creating Something Like A SubForm

Nov 19, 2004

I desperately need some help with this one.

I have a Form/Subform/subSubform setup, but with all those stacked forms, I don't have room for all the fields on the screen.

How can I open a form (the subSubform) in its own window, but have it behave like a subSubform should?

Each relationship is many-to-one.

View 1 Replies View Related

Creating A Conditional Subform

Jul 19, 2007

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!

Thanks very much in advance for any help!

Steve

View 10 Replies View Related

Creating A Conditional Subform

Jul 19, 2007

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!

Thanks very much in advance for any help!

Steve

View 1 Replies View Related

Subform Creating An Edit Button

Jul 2, 2006

Main form is frmPeople

As you can see i have a subform called frmPeopleInsurancesSub
Next to that I have a Edit Command button which open a forms called
PeopleInsurances

When user wants to edit one of the insurances all user has to do is click on on one of the insurance and click edit to take user to that record

But cant make it work


Any Ideas

View 4 Replies View Related

Creating Report From A Form That Has Subform

Dec 6, 2004

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.

ronnie

View 1 Replies View Related

Creating New Record In Main Form From Subform

Aug 4, 2005

Hi,

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...

View 1 Replies View Related

Disable Subform When Creating Record In Parent

Jul 27, 2004

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...

View 3 Replies View Related

Forms :: Creating Subform Using Single Table?

Feb 12, 2014

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.

View 2 Replies View Related

Forms :: Information Not Retained Within Subform When Creating A New Record?

Jan 20, 2014

I have a form and a subform.

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!!

View 4 Replies View Related

Forms :: Access 2010 - Creating A New Record In A Subform?

Apr 12, 2014

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 :

Forms!peripheralsViewForm.PeripheralsSubForm.Form! Quantity = Me.newquant DoCmd.Close acForm, "perquantform", acSaveYes

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:

Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerType = Me.pertypedrop
Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerMake = Me.permakedrop
Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerModel = Me.newmodel
Forms!peripheralsViewForm.PeripheralsSubForm.Form! PerDescription = Me.newdescription
Forms!peripheralsViewForm.PeripheralsSubForm.Form! Quantity = Me.newquantity
DoCmd.OpenForm "PeripheralsViewForm"
DoCmd.Close acForm, "addperform"
--------------------------------------

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.

Using Access 2010.

View 14 Replies View Related

Creating New Records

May 24, 2005

Hi

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

View 1 Replies View Related

Creating A Set Of Records

Nov 23, 2005

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 ?

Thanks

View 5 Replies View Related

Forms :: Creating Record From Subform - Use One Of Values In Main Form

Apr 5, 2013

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

View 2 Replies View Related

Tables :: Creating Invoice System With Subform Within Main Form?

Nov 24, 2013

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?

View 1 Replies View Related

Forms :: Creating New Record In Subform - Button To Add New Object To Main Job

Jul 1, 2013

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.

View 11 Replies View Related

Creating New Records In A Table

Sep 28, 2006

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???

Thanks in advance for the help

View 4 Replies View Related

Creating Top Values With Two Records?

Oct 15, 2007

Hey all,

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.

View 1 Replies View Related

Creating New Records For Students?

Jan 23, 2013

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.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved