Subform Data Disappearing On Entry

Oct 2, 2006

Hi all,

I apologize if I'm missing something terribly simple.

Here's the background: I have a set of 3 tables linked to a main table based on a field called SampleID. I then have one main form (SAMPLE) with the other 3 tables (INDIVIDUAL, LOCATION & ORGANISM) all as subforms within the main form.

everything seems to work well in terms of links and getting the data into the appropriate tables and retaining the SampleID link. However, during data entry using the tab key, I am unable to find an eloquent way to move from the main form to subform1, then from subform1 to subform2, from subform2 back to main etc. I have set the tab order, and used the afterupdate control to change the focus which works, however as soon as I move from subform1 to subform2, the data just entered disappears from subform1. The data makes it to the table without any problem, but just blanks out the form.

From what I can see, when the subform loses focus it automatically saves the edited record and inserts a new record, thereby blanking out the fields that were just entered. Is there a property that can be set so that a new record is not automatically entered when leaving a subform? Is there a method to do this through coding?

any help would be greatly appreciated!!

Thanks in advance.....

View Replies


ADVERTISEMENT

Disappearing Data In Subform

Apr 9, 2006

I have a form with an unbound subform that was working quite nicely. The only change I made was changing the data source for the main form from a query to a static table; name of table same as the prior query. Now the subform appears but the data doesn't. The buttons in the subform header are visible and work but the detail is not visible when displayed as a subform, it is fine if I open the subform as a separate form, I see the correct records based on the main form's criteria.

I have searched for some property I may have accidentally changed but can't find anything. It isn't set in data entry mode, not even a blank line shows.

Has anyone had this happen?

View 4 Replies View Related

Subform Blues - Data Entry Setting Itself To 'No' & Requerying 1 Subform From Another

Dec 5, 2006

2 Subform problems

I have a data entry subform that is only supposed to show an empty record ready to be populated, and a display records subform that is supposed to show all the records. The subforms are both on the same tab of a tab control on my main form.

Problem 1:
The data entry subform shows all the records rather than a blank record. Something on my main form is causing it to show the records when it should not. Any ideas? The Data Entry is set to Yes.

To try to isolate the problem, I created a new form and added the subform to it where it behaves properly:confused:

I then added Me.DataEntry = True to the form open to see if that would solve my problem but it still sets the data entry to no.

If I have the properties box open when in form view of my main form, I can set the data entry to Yes and it works fine until I move to the next record of the main form when it resets to no. Teraing my hair out here.:mad:

My final attempt was to search the entire project to see if there is a "DataEntry = False" somewhere but there isn't. What is setting this property? Any ideas where I should look?


Problem 2:

After entering data in the first subform (data entry form), I want to re-query the second subform but I just can't get the syntax right. I have wrestled with the "Syntax for subs" document downloaded from http://www.mvps.org/access/forms/frm0031.htm (Microsoft MVP site) but to no avail.

My main form is called fdlgPrjDetails, the data entry is via fsubPrjCommentsUsersDataEntry and the subform I wish to requery is fsubPrjCommentsUsers.

None of the attempts below worked giving a cannot find control error.


Private Sub Form_AfterUpdate()
On Error GoTo ErrHandler

Me.Requery

'Me!fsubPrjCommentsUsers.Requery
'Me!fsubPrjCommentsUsers.Form.RecordSource.Requery
'DoCmd.Requery ([fsubPrjCommentsUsers])
'DoCmd.Requery [fsubPrjCommentsUsers]

ExitHere:
Exit Sub

ErrHandler:
MsgBox Err.Number & " - " & Err.Description & Chr(13) _
& Chr(13) & "Error in fsubPrjCommentsUsersDataEntry: Err 003"
Resume ExitHere
End Sub


Any Ideas?

Both problems have me stumped so I'll be grateful to anybody with a scoobie on this.:)

View 10 Replies View Related

Subform Data Entry

Apr 27, 2006

Hello all,

I'm looking for a little help on something that I'm sure is an easy problem. I'm building a form for patients (data from Table: Patients) that contains a subform containing lab values (Table: Lab Values). I'm new at using subforms so I'm in a little over my head.

Both Tables contain the patients name to link them together. When I create the subform, I don't want it to display the patient name, because it is already displayed in the header. But if I don't include that field, I can't link the two tables together. I'm using one of Microsoft's templates off their website (called Contact Manager Database) as a guide, and it has exactly what I want - a sub form that only displays the relevant data for each patient, but when you add a record the data in the table automatically includes the name of the person.

I just can't seem to figure out how to do this. I'm sure I've been very unclear describing this, and I'm sure this is an easy task, but if someone can give me a little direction I would greatly appreciate it.

Cavy

View 3 Replies View Related

RFT Problem And Subform Data Entry

Mar 2, 2005

1st:

I have used the Lesban Rich Textbox Control. However, I face a problem with the control and cannot solve. The thing is that whenever I select an item from a combo box which loads a no record it refers to, it always ignore my first letter input. The second one will go just fine (e.g. when I enter ABC...., the control will ignore the A letter) Hope you get what i mean. I dunno if I made mistakes somewhere with the control. Does anyone have any idea that such thing should be done?

2nd:

In the same form as above one, I also designed 2 other subforms, however, it always raises error when I enter data while the main form contains nothing. I want to disable those 2 subforms when the main form record isn't filled out. I found a similar result in the forum, but it doesnot work with Rich Textbox Control's update event.

View 6 Replies View Related

Subform Data Entry Problem Blank Line

Jul 7, 2005

I have a main form where the user chooses a BoxID. There is a subform on this main form that has a relationship between BoxID on the main form and subform. The users are entering data in the subform and when they have entered 10 lines of info I have a message that tells them to start a new box (I could not work out how to do it any other way as I lack VB skills). The user closes the form or clicks add new record to create a new box. If I view the previous record there should only be 10 lines of information in the subform but there are 11 as it takes the blank line as a new record....

View 8 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

How To Update A Field In Subform When Main Form Is Data Entry

Sep 19, 2012

I have a mainform set to data entry to add records to TABLE1. I inserted a subform that shows fields from TABLE2. I have a field in TABLE2, let's say TBL2FLD1(NUMBER). I want to add TBL1FLD2(NUMBER) from TABLE1 in the mainform to TBL2FLD1 and update said field in TABLE2.

My problem is:

(1) I get a #TYPE! error when I try to add the two fields, which I have tried many, many ways (adding them together in the Default Value; creating an unbound field to hold the calculation and then putting that field into the Default Value of TBL2FLD1; ETC), and
(2) I don't know how to get the subform to update TABLE2. It seems like the control gets stuck in the subform. Is there a way to accomplish this without coding it?

View 3 Replies View Related

Forms :: How To Make Subform Filter Its Data From Date Entry Selection

Aug 17, 2014

In my main form, there is this date entry selection and a subform with data on it.

How can I make the subform filter its data from date entry selection?

I have already created a relationships for my tables

I created a query for this subform (should I need to?)

It does not refresh my subform or I do not know what to do?

View 12 Replies View Related

Disappearing Data - Switchboard

Dec 4, 2005

Hi peeps. I created a switchboard that opens a form in add mode. I click the button to open the form, it appears, but with no data - its blank.

If I open the form by itself (not via switchboard) its all there.

Whats up?
Help!

View 3 Replies View Related

List Box Data Disappearing

Apr 16, 2005

I have a form called CreatePL which is made up solely on List Boxes that the user must choose from. After all the choices are made, I have a button to save the information to a table called PL.

I noticed that after clicking on this button, that record stays active so when you try to create the next record, it is actually changing the previous record. As I was testing this a bit further, I also noticed that the one of the names in one of the list boxes got erased (I'm not sure how yet).

Is there a way to lock the information but still be able to make selections and save it to a table? When I choose the properties so that you can't edit, I loose the ability to make choices also. All of the list boxes are set to "limittolist".

View 9 Replies View Related

Entered Data Keeps Disappearing

Mar 3, 2006

Hi All,

I've got a form with a series of combo boxes which are dependent on each other, however i keep finding that after ive entered some data and left a record, when i then return to the record, some of the information ive entered has been deleted and the combo box is blank.

I think it must be requerying the combo boxes everytime the record opens but i dont know why, i have only put requerys "OnChange" because that is the only time the dependent combo boxes should be requeried.

Once the info is entered and ive moved on to a new record, i need for it to stay that way when i return to the record and only change again when i edit it.

Help please anyone, its been doing my head in.

Cheers

K

View 4 Replies View Related

Forms :: Default Entry Into Subform Based On Data Entered In Main Form

Apr 23, 2014

I have a form that request the User to enter a Parcel ID number (99-9a-99-99aaa-aaa-aaaa). The sub form asks for the subdivision number, block number, and lot number. The subdivision number, block number and lot number are normally part of the Parcel ID number but sometimes they can be different. I want the sub form to fill in the Subdivision number, block number, and lot number as a default but allow the user to change the value if needed. currently the sub form will only show what is entered into the table itself if a change is made on the main form the sub form does not reflect the change.

View 3 Replies View Related

Very Strange Problem Of Disappearing And Reappearing Data...

Jul 19, 2006

Good morning, I am experiencing an extremely strange problem that I will try to explain here...

I have got a subform which goal is only to display a few fields from a database. Not any interaction is made from mother forms, it just displays data, and that's all. It is really simple, and has been created with a wizard.

One of the fields, that is named OrderPart, has got for values either True or False. Most of the times, I don't have any problem, but, only when all the OrderPart fields are set to false, nothing is displayed anymore on the form, like if everything were hidden.

And if I change only one of these values to true, all other rows reappear, including those with the OrderPart field set to false.

The query to get the data is: SELECT subparts.* FROM subparts WHERE (((subparts.repairno)=[forms]![subpart assignment]![reportno])); . Moreover, when I run it outside the form, it always displays all information.

I don't have any filter, my request selects all objects, and I don't have any code, so I absolutely don't understand how this may happen! So if somebody should have a little clue, it should be very nice, thank you very much :D !!!

View 1 Replies View Related

Data Disappearing From Unbound Text Boxes Upon Edit.

Jan 12, 2006

Hello,

I have a form that utilizes a combo box called cboProgAddr (for Program Address). The cbox has 5 columns each of which fills in an adjacent text box. Since I needed the option of making corrections to these text boxes once they were filled in I need to set them up as unbound via the following code in the After Update event of cboProgAddr:

Private Sub cboProgAddr_AfterUpdate()
Me!txtProgStreet.Value = Me!cboProgAddr.Column(1)
Me!txtLocStreet.Value = Me!cboProgAddr.Column(1)
Me!txtProgCitySt.Value = Me!cboProgAddr.Column(2)
Me!txtLocCitySt.Value = Me!cboProgAddr.Column(2)
Me!txtProgZip.Value = Me!cboProgAddr.Column(3)
Me!txtLocZip.Value = Me!cboProgAddr.Column(3)
End Sub

As you can see it puts each field of data into two separate text boxes. Here's the issue: If I have to go back to the form after the original data entry the following boxes are blank...

txtProgStreet
txtProgCitySt
txtProgZip

while the following retain the orginal data...

txtLocStreet
txtLocCitySt
txtLocProgZip

The original cboProgAddr maintains its original data. All six fields above are stored in the same table as text field. I'd like all the boxes to maintain the data from the original input.

I'm totally baffled why this is so. I've attached images of the combo box control functions if that helps.


Thanks,
David

View 1 Replies View Related

Disappearing Data In Split Database - Access 2007

Jul 30, 2012

I work with an Access 2007 database that I split into a front end and back end. The back end holds all of the tables and the front end holds the queries, forms and reports. It is also a multi-user database, in that we have 14 people having access to the same back end. Each of the 14 people have their own front end. I have one main table in the back end listing clients and their individual ID numbers. That table has a One to Many relationship with several other tables, such as Case Notes and Authorizations, to name a couple.

Here's one of my problems: Sometimes data that is entered by a user will disappear.

Example 1: User creates a new record in the Authorizations form. Sometimes it is created by duplicating an existing record, sometimes it is completely new. User then prints a report from that new record, which looks like it has been saved. A couple minutes later, or a couple hours later, or maybe even the next day, user goes back into the database and cannot find the record that was previously created. At that time I look in the back end and cannot find the record either.

Example 2: User creates a new record in the Case Notes form on Day 1. These are always completely new records. User returns to the database on Day 2 and the new record sometimes does not show up in the form or in the back end table.

I cannot MAKE these things happen and they are sporadic, which makes it hard to diagnose, but why this was happening or if there was a way to retrieve the lost data.

View 4 Replies View Related

Forms :: Copy Value From Field In Subform To Field In Main Form During Data Entry

Jul 18, 2013

How can I get the value from a field in one table (in the sub form) to copy/insert into a field in another table (in the main form) when adding a new record?The main form and sub form are linked using parent/child linking, and the sub form is in a tab.I have table A (Visit Dates) in the main form which is used to record the date of a visit to a church. Table B (Quarters and Peals) is used to record an event that took place at that church during that visit. Note that not all visits in table A require a record to be created in table B - but half or more do.

In tables A and B I have a field called "QuarterOrPealID" and these are both primary keys, though the field in table B is set to 'no duplicates' and in table A it's set to 'duplicates allowed', as table A has its own auto number/pk. They are both linked in the relationships.

So, when I add a new record to table A using the main form, I might then need to click on the tab in the sub form to create a new record in table B, which has to be linked to the same record in table A. When the "QuarterOrPealID" auto number/pk is generated in the sub form (table B), I need that value to update to the "QuarterOrPealID" field of the main form (table A), so that when I'm viewing these records the form pulls all the information nicely together.

View 10 Replies View Related

Open Subform At New Entry

Aug 29, 2006

I have a form with a combobox to select a clients name and that pulls up that client in a subform and shows various records for the client. But it always opens up showing the first record and I want it to open up showing a blank record for keying in more data i.e. after the last record.

Can you help at all on this?

many thanks

View 1 Replies View Related

Data Entry - Auto Fill Data For Exisitng Accounts In Records

Mar 9, 2006

First I would like to give thanks to all the knowledgeable folks here who have helped me with my DB to date. It is working and every one is very happy and I have learned a lot.

So now I would like to add some more functionality to this existing project.

My DB is for data input of customers for a drawing. It has the following fields: Id, account number, first name, last name, date/time, score1, score2.

I t is taking a great deal of time for the users to enter in hundreds of entries a day. Most of the entries are customers who are already in the DB. I would like to get the fields to auto fill the data for existing customers say after the account number is entered. So after you put in the account the name and any other pertinent data would shows up saving users from typing it in again.

The first problem I am having is that this is still a data entry form and I can’t figure out how to be able to see the account information and still add new data to the record? The new data is a daily score they get.

Second I haven’t figured out how to call up the customers information from just the account field.

I’ve googled this and haven’t found anything terribly helpful.

View 2 Replies View Related

Forms :: Create Data Entry Form To Input Data For Field

Mar 5, 2015

I an trying to create a data entry form (IndividualsEntryFm) to input data for fields such as (First Name),(Birthdate) etc., these to be saved to the (IndividualsTbl)

I also have another table (NamesTbl) which has family names etc. The two tables are linked by a (MainID) field. I want a combo box on the individualsEntryFm so that I can select the family name. Then I wish the empty fields for the IndividualsTbl to be available to enter data.When I press the save button I then want this data saved, together with the MainID from the combo box to the IndividualsTbl.

I have set the IndividualsTbl with a (PersonID) field as an auto number each individual therefore has a unique PersonID but may well share the MainID. I'm trying to link many people to the same address.

View 1 Replies View Related

Modules & VBA :: Datasheet Mode Form For Both Data Entry And Data Retrieval

Feb 9, 2015

I want to use the same form in datasheet mode for data entry and retrieval. When retrieving, all controls are disabled and locked. I am trying to enable and unlock them for modifying but that isn't working.

<code>
DoCmd.OpenForm "PO_Practice Data", , , , acFormEdit, acHidden

Forms![PO_Practice Data]!PO_Name.Enabled = True
Forms![PO_Practice Data]!PO_Name.Locked = False
Forms![PO_Practice Data]!Practice_Name.Enabled = True
Forms![PO_Practice Data]!Practice_Name.Locked = False

[code]...

View 3 Replies View Related

Preventing Multiple Entry In Subform

May 4, 2005

Hi
I have a form and sub form, the sub form is populated from a query and has a column of checkboxes. Basically these checkboxes get checked as part of the form, but only a maximum of five are allowed to be checked. Is there a way of achieving this?
Cheers
Dan

View 1 Replies View Related

How To Require Entry In A Field On A Subform?

Aug 8, 2005

I haven't been able to figure out the code to require entry (for a new record) in a field on a subform - anyone can help with this?

The situation is a contacts database, and each new contact should have a (or multiple) Person Roles entered as well, which is their relationship to the organization.

View 2 Replies View Related

Forms :: Subform Relationship With New Entry

Mar 28, 2014

I have a Workorder Form that holds all the fields that apply to the entire project (payment, customer, etc).

Then I have a subform for Stock. This allows there to be several different stock items (and production information relevant to that stock) assigned to a Workorder.

I have successfully linked the two so that when a Workorder is opened, it shows any related Stock in the subform that has already been created.

The problem is new stock entries. I need it to only allow Stock additions to the current open related Workorder.

I currently have it where you can type in the WorkorderID (autonumber) on the Stock subform new entry and it will work. But I do not trust employees to type in the correct number every time they need to add stock to a Workorder. I can't release it this way.

I mean, the whole point is for the database to promote as little error as possible, right?

View 5 Replies View Related

Using Subform Entry As Criteria In A Query

Nov 14, 2012

I have the following Form and Subform. Form name is "100-Select Form". Subform name is "103-Report Dates". Within the subform I have two fields I'm using, "Start Date" and "End Date'.

In my query I have a date field. I want the query to read from the Subform (if I open the subform directly my criteria listed below works, but when the main form is open, my query doesn't seem to be able to read from the subform).

Here is the criteria I have in the date field of my query: >=[Forms]![103-Report Dates]![Start Date] And <=[Forms]![103-Report Dates]![End Date]

I have a feeling that I somehow should be pointing my criteria first to '100-Select Form', and then to '103-Report Dates' within that form, but I'm just not sure how to write this and nothing I'm trying is working.

View 2 Replies View Related

Forms :: Saving Specific Data From Data Entry Form Depending On User Selection

Dec 18, 2014

I am trying to save specific data from a data entry form to a specific depending on what the user selects from a dropdown/combo box.

So if the user selects "test company from the combo box, that data (from that form) will save to the Test company data table.

View 5 Replies View Related







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