472,811 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 software developers and data experts.

Find: record found, incorrect data shown

HJ
Hi all,

Consider an Access 2002 run-time application on Windows XP. The controls on
a form are locked until the user clicks an Edit button. The form is based on
a query and all controls are bound.

On this form the user can use a Find button to call the standard Find
dialog. Then the user enters search criteria and the wanted record can be
found.

This works fine, except for some occasions when the correct record number
has been found, but not all data in the controls correspond with this record
number. Only when the user clicks the Edit button to make modifications the
corresponding data are shown.

It looks like the display is not being refreshed correctly. This happens
infrequently and so far only on a single computer (and not on five other
computers with the same application). What may be the cause of this?

HJ
Nov 12 '05 #1
5 3691
More information please:

What version of Access and what service pack? (Help | About)

How is the record being found? Bookmark of form?

Roughly how many records in the form's recordset at the time when it fails?

Is this a continuous form with some text boxes in the form footer section?

Are you explicitly saving before attempting to move?

The controls that don't match - anything consistent about them, e.g. are
they bound to expressions that are not updated in time?

Is there anything in other events (e.g. Form_Current) that could be
relevent?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"HJ" <hj******@hotmail.com> wrote in message
news:3f***********************@dreader7.news.xs4al l.nl...

Consider an Access 2002 run-time application on Windows XP. The controls on a form are locked until the user clicks an Edit button. The form is based on a query and all controls are bound.

On this form the user can use a Find button to call the standard Find
dialog. Then the user enters search criteria and the wanted record can be
found.

This works fine, except for some occasions when the correct record number
has been found, but not all data in the controls correspond with this record number. Only when the user clicks the Edit button to make modifications the corresponding data are shown.

It looks like the display is not being refreshed correctly. This happens
infrequently and so far only on a single computer (and not on five other
computers with the same application). What may be the cause of this?

Nov 12 '05 #2
HJ
OK. See answers below. Thanks for your help.

HJ

"Allen Browne" <ab***************@bigpond.net.au> wrote in message
news:ri*******************@news-server.bigpond.net.au...
More information please:

What version of Access and what service pack? (Help | About)
Access 2002, no service pack applied.
How is the record being found? Bookmark of form? Standard Access Find dialog box. I do not know how Access does it's search.

Roughly how many records in the form's recordset at the time when it fails? About 15.000
Is this a continuous form with some text boxes in the form footer section? Single form. Text boxes only in Detail section.
Are you explicitly saving before attempting to move? No.
The controls that don't match - anything consistent about them, e.g. are
they bound to expressions that are not updated in time? No. Controls are directly bound to table fields (through the query of
course).
Is there anything in other events (e.g. Form_Current) that could be
relevent? Yes.
1. The current record number and the total number of records are printed in
a label caption.
2. Controls are being locked when the record is not a new record. For the
finding procedure this will always be the case.

Private Sub Form_Current()

'Fill the recordnumber label
Dim rs As DAO.Recordset
If Me.NewRecord Then
Me.lblRecordNumber.Caption = "New item"
Else
Set rs = Me.RecordsetClone
rs.MoveLast
rs.MoveFirst
With Me.RecordsetClone
.Bookmark = Me.Bookmark
Me!lblRecordNumber.Caption = "Item " & _
.AbsolutePosition + 1 _
& " of " & .RecordCount
End With
End If

If Me.NewRecord Then
Call UnlockFields
Else
Call LockFields
End If

Me.lblLocked.Visible = False
Me.puAddressee.SetFocus

End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"HJ" <hj******@hotmail.com> wrote in message
news:3f***********************@dreader7.news.xs4al l.nl...

Consider an Access 2002 run-time application on Windows XP. The controls on
a form are locked until the user clicks an Edit button. The form is

based on
a query and all controls are bound.

On this form the user can use a Find button to call the standard Find
dialog. Then the user enters search criteria and the wanted record can

be found.

This works fine, except for some occasions when the correct record number has been found, but not all data in the controls correspond with this

record
number. Only when the user clicks the Edit button to make modifications

the
corresponding data are shown.

It looks like the display is not being refreshed correctly. This happens
infrequently and so far only on a single computer (and not on five other
computers with the same application). What may be the cause of this?


Nov 12 '05 #3
While I'm not aware of a specific issue with A2002, the service packs are
always worth while when things are not working well.

Explicit save before any move/filter can save some weird behavior in Access.
Before calling the find dialog, you might consider adding:
If Me.Dirty Then
Me.Dirty = False
End If

Would it be possible to test this with the Form_Current disabled? That would
establish whether it is playing any part in the problem. Anything that
happens between the start of the problem (issuing the Find) and the end
(record displayed) should be considered as possibly related.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"HJ" <hj******@hotmail.com> wrote in message
news:3f***********************@dreader8.news.xs4al l.nl...
OK. See answers below. Thanks for your help.

HJ

"Allen Browne" <ab***************@bigpond.net.au> wrote in message
news:ri*******************@news-server.bigpond.net.au...
More information please:

What version of Access and what service pack? (Help | About)
> Access 2002, no service pack applied.
How is the record being found? Bookmark of form?
> Standard Access Find dialog box. I do not know how Access does it's search.

Roughly how many records in the form's recordset at the time when it

fails?> About 15.000


Is this a continuous form with some text boxes in the form footer section?
> Single form. Text boxes only in Detail section.


Are you explicitly saving before attempting to move?
> No.


The controls that don't match - anything consistent about them, e.g. are
they bound to expressions that are not updated in time?
> No. Controls are directly bound to table fields (through the query of course).

Is there anything in other events (e.g. Form_Current) that could be
relevent?
> Yes. 1. The current record number and the total number of records are printed

in a label caption.
2. Controls are being locked when the record is not a new record. For the
finding procedure this will always be the case.

Private Sub Form_Current()

'Fill the recordnumber label
Dim rs As DAO.Recordset
If Me.NewRecord Then
Me.lblRecordNumber.Caption = "New item"
Else
Set rs = Me.RecordsetClone
rs.MoveLast
rs.MoveFirst
With Me.RecordsetClone
.Bookmark = Me.Bookmark
Me!lblRecordNumber.Caption = "Item " & _
.AbsolutePosition + 1 _
& " of " & .RecordCount
End With
End If

If Me.NewRecord Then
Call UnlockFields
Else
Call LockFields
End If

Me.lblLocked.Visible = False
Me.puAddressee.SetFocus

End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"HJ" <hj******@hotmail.com> wrote in message
news:3f***********************@dreader7.news.xs4al l.nl...

Consider an Access 2002 run-time application on Windows XP. The controls on
a form are locked until the user clicks an Edit button. The form is based
on
a query and all controls are bound.

On this form the user can use a Find button to call the standard Find
dialog. Then the user enters search criteria and the wanted record can

be found.

This works fine, except for some occasions when the correct record number has been found, but not all data in the controls correspond with this

record
number. Only when the user clicks the Edit button to make

modifications the
corresponding data are shown.

It looks like the display is not being refreshed correctly. This

happens infrequently and so far only on a single computer (and not on five other computers with the same application). What may be the cause of this?



Nov 12 '05 #4
HJ
Thx for your help. I will try that next week at the office.

HJ

"Allen Browne" <ab***************@bigpond.net.au> wrote in message
news:e8*******************@news-server.bigpond.net.au...
While I'm not aware of a specific issue with A2002, the service packs are
always worth while when things are not working well.

Explicit save before any move/filter can save some weird behavior in Access. Before calling the find dialog, you might consider adding:
If Me.Dirty Then
Me.Dirty = False
End If

Would it be possible to test this with the Form_Current disabled? That would establish whether it is playing any part in the problem. Anything that
happens between the start of the problem (issuing the Find) and the end
(record displayed) should be considered as possibly related.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"HJ" <hj******@hotmail.com> wrote in message
news:3f***********************@dreader8.news.xs4al l.nl...
OK. See answers below. Thanks for your help.

HJ

"Allen Browne" <ab***************@bigpond.net.au> wrote in message
news:ri*******************@news-server.bigpond.net.au...
More information please:

What version of Access and what service pack? (Help | About)
>>> Access 2002, no service pack applied.

How is the record being found? Bookmark of form?
>>> Standard Access Find dialog box. I do not know how Access does it's

search.

Roughly how many records in the form's recordset at the time when it

fails?
>>> About 15.000

Is this a continuous form with some text boxes in the form footer section?>>> Single form. Text boxes only in Detail section.

Are you explicitly saving before attempting to move?
>>> No.

The controls that don't match - anything consistent about them, e.g. are they bound to expressions that are not updated in time?
>>> No. Controls are directly bound to table fields (through the query of
course).

Is there anything in other events (e.g. Form_Current) that could be
relevent?
>>> Yes.

1. The current record number and the total number of records are printed

in
a label caption.
2. Controls are being locked when the record is not a new record. For the
finding procedure this will always be the case.

Private Sub Form_Current()

'Fill the recordnumber label
Dim rs As DAO.Recordset
If Me.NewRecord Then
Me.lblRecordNumber.Caption = "New item"
Else
Set rs = Me.RecordsetClone
rs.MoveLast
rs.MoveFirst
With Me.RecordsetClone
.Bookmark = Me.Bookmark
Me!lblRecordNumber.Caption = "Item " & _
.AbsolutePosition + 1 _
& " of " & .RecordCount
End With
End If

If Me.NewRecord Then
Call UnlockFields
Else
Call LockFields
End If

Me.lblLocked.Visible = False
Me.puAddressee.SetFocus

End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"HJ" <hj******@hotmail.com> wrote in message
news:3f***********************@dreader7.news.xs4al l.nl...
>
> Consider an Access 2002 run-time application on Windows XP. The controls on
> a form are locked until the user clicks an Edit button. The form is

based
on
> a query and all controls are bound.
>
> On this form the user can use a Find button to call the standard
Find > dialog. Then the user enters search criteria and the wanted record can be
> found.
>
> This works fine, except for some occasions when the correct record

number
> has been found, but not all data in the controls correspond with

this record
> number. Only when the user clicks the Edit button to make

modifications the
> corresponding data are shown.
>
> It looks like the display is not being refreshed correctly. This happens > infrequently and so far only on a single computer (and not on five other > computers with the same application). What may be the cause of this?



Nov 12 '05 #5
HJ
Thx. I can add this just as well, although the controls are all in the
Detail section. All controls are text boxes. I will see this week what I
happens.

HJ

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:6b********************************@4ax.com...
You were not specific about which controls do and do not show the correct
data, but there is a bug in both Access 2K and 2K2 in which, sometimes the
form header/footer do not synchronize with the current row in the detail.
The fix that has worked for me is to requery one of the controls in the
header or footer in the form's Current event handler. I just automatically add this code to any form with a header or footer now in order to avoid the problem.

On Sat, 30 Aug 2003 11:25:38 +0200, "HJ" <hj******@hotmail.com> wrote:
Hi all,

Consider an Access 2002 run-time application on Windows XP. The controls ona form are locked until the user clicks an Edit button. The form is based ona query and all controls are bound.

On this form the user can use a Find button to call the standard Find
dialog. Then the user enters search criteria and the wanted record can be
found.

This works fine, except for some occasions when the correct record number
has been found, but not all data in the controls correspond with this recordnumber. Only when the user clicks the Edit button to make modifications thecorresponding data are shown.

It looks like the display is not being refreshed correctly. This happens
infrequently and so far only on a single computer (and not on five other
computers with the same application). What may be the cause of this?

HJ

- Steve Jorgensen

----
I would have written you a shorter program,
but I didn't have the time.

Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: JIMMIE WHITAKER | last post by:
Can someone help on this: I am just learning, and I'm connecting to the the northwindcs.mdf tables / open file is northwindcs.adp. This is the sample installed using msde, which is supposed to be...
4
by: Jim in Arizona | last post by:
I'm wanting to do a simple controlled voting page. I too our webserver off anonymous and everyone who accesses the website is a domain authenticated user. I've already done some control structure...
2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
5
by: ddecoste | last post by:
I am trying to create a form to make it easier to modify a record without having to page through all the records. I have started the form with 3 cascading combo boxes. ie #1 asks for division ,...
1
by: Wes Brooks | last post by:
Hello expert, Please help me with the following problems. I have spent ages to resolve them but no luck. I have two forms. (1) "Document Reception Input Form" is the main form. The search...
12
by: TS | last post by:
If I was to have my biz layer ask the data layer to load a particular object based on key field info i pass to it, and it cannot create the object becaues it isnt' in the Db, should the data layer...
7
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
1
by: farhan31 | last post by:
Hello all I have Two tables.Table 1 and table 2.Table 1 has one to many relation with Table 2.I have one main form Form1 based on table 1.On form 1 i have a sub form based on table 2.I have put a...
5
by: kickergirl | last post by:
I have created a form to allow users to add a new record and/or search for an existing record based on SSN. If the SSN the user enters into SrchID_text is found, the form is populated and a message...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.