Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prior data popping up on subform

Status
Not open for further replies.

lorirobn

MIS
Mar 15, 2005
450
0
0
US
Hi,

I have new forms that a user just started using. She is having problems with data from a prior record popping onto the current form. Here are the details:

It is a main form with a subform (continuous). Main Form's recordsource is a query off tblHeader, subform's recordsource is query off tblDetail.

She is updating tblDetail records via the subform. Intermittently, here's the problem that happens:
she is in the process of an 'addnew' detail record on the subform, then at some point, notices that one field on the subform actually contains values from a detail record she had been editing awhile ago!!! (not sure how many records back). This 'older' data has literally popped back on the screen.

I suspect it's a problem with the forms, not with actual data stored on the tables, by what I have been able to check. I can't replicate this problem.

If it matters at all, I am using Access 2003, SQL Server 2000, and the field where the data is popping up is a field called Comments, which is an nvarchar field of length 200.

As I write this, I am realizing: both the form and the subform have Comments fields on their record source Queries, one from tblHeader, one from tblDetail. I call one 'txtComments', the other Comments, on their forms. In addition, subform has 'HdrComments' field, which comes from tblHeader.

Could all this be causing a problem? Am I not properly identifying the fields?

Any advice?

Thanks so much in advance,
Lori
 
did she use a scrollwheel or perhaps does one filed has a lostfocus event?

grtz Flippertje
 
I think Flippertje's on the right track! The mouse scrollwheel would have been my first guess. If it hasn't been "locked" it will move thru the records giving the effect you're experiencing.

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
I have the scroll wheel disabled - but that's a great point - I can make sure it's working on her pc (it's working on mine)!!

Thanks - I will check it out this morning -
(but still wondering why it only happens on 1 field out of 12 fields on the subform).
Lori
ps - no LostFocus event.
 
Just checked, and my user's PC scroll button doesn't work in these forms. Scroll wheel disabled.

I changed the names of the Comments fields on the 2 tables, to make them unique. Not sure if this will have any effect or not.
 
Only other thing I can think of involves an Access shortcut. <Ctrl> + <'> places a field's value from the previous record into the same field on the current record. Could the user being trying to enter double quotes (<Shift> + <">) and accidentally hitting the <Ctrl> key, giving <Ctrl> + <'> instead?

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
hmmm...she is used to using <Ctrl> a lot (she asked me to put in <Ctrl> + <S> for her to save more easily, which I haven't done yet). Perhaps she is inadvertently pasting... or using <'> like you suggest.

I will check this out! Thanks for the suggestion...
 
Missingling, thanks to your email, I've discovered she's been using control keys to copy and paste Comments from one detail line to other lines/other records. So, this was a big 'Aha!'

I suspect other key movements are causing the Paste action to happen, like you mention. Do any other key actions cause the Paste action to occur, besides the obvious <Ctrl> + <v>? I don't think she'd be trying to put quotes in (double or single), but it's worth investigating.

By the way, is there any key combination that would not only cause prior record's contents to be placed into current record, but also delete the field on the prior record? She feels this is happening, too, but I haven't been able to test for this (she always cleans it up before I can look).

Thanks so much - this is helping greatly!

Lori
 
This is really bizarre! The only thing I can think of is if she goes to copy a field but instead of hitting <Ctrl> + <C> she accidentally hits <Ctrl> + <X> (X being adjacent to C on the keyboard) she would Cut the field instead of simply copying it. It would still paste, of course, and she might not notice the fact that it was cut from the original field. If it was me, I'd do some extensive testing myself, and if these anomolies don't occur, assume it was "operator error."

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top