Subform Jumping to first record field

timbl

Registered User.
Local time
Today, 04:40
Joined
Oct 15, 2011
Messages
32
I am new to access and have created a databse in Access 2000 for logging customers and orders at my workplace.

I am having a huge problem with a subform which when entering data into it randomly puts the cursor to the first field of the first record within the subform. The consequence of which is that the data in the first field gets overwritten if you are not careful. It is not consistent so please play around by clicking various fields within the subform.

The form in question is FrmRepairdetails with the subform SFRMRepairDetails.

Any help would be appreciated. I have spent ages searching forums for an answer but they all talk about requerying or refreshing causing problems but I do not believe this is the case with my db.
 

Attachments

Barring corruption, the moving of Focus to the first Control on the First Record of a RecordSet is almost sure to have been caused by the RecordSet having been Requeried.

Are you talking about Focus being sent to the first Control on the First Record? And could you describe exactly how/when it happens? I couldn't repeat your problem, even after a great deal of playing with it, but if it is as random as you suggest, you may very well be dealing with corruption of your Form.

Linq ;0)>
 
Thanks for the reply, Yes I guess I am talking about focus being sent to the first control of the first record in the subform.

I have recreated the form and subform from scratch and still get the same problem. The new forms are FrmRepairDetailsNew and SfrmRepairDetailsNew.

It is as I say completely random, sometimes after just one change in the subform sometimes 10 or 20 random clicks in the subform fields.
 
Did you copy the textboxes from the old form onto the new form or did you create a new one?

Do you Requery the form/subform or have any code that performs a search on them?
 
Created both forms from scratch again, apart from Boat name drop down box which I copied from other form as it had some code that I could not remember how to create!

I do not believe I have any requery code within the forms.
 
No need to continuously re-create the form ;)

Tell us the steps to reproduce the problem.
 
Just to let you know the database I attached has had most of the 10000 records removed, just a few records are left in to show the problem.
 
The steps are open the form "FrmRepairDetails" This contains a subform which has repair Items that a customer has brought in. When clicking in the fields of the subform the focus sometimes goes to the first field (Item) on the first row without warning. As a consequence of the focus moving without warning when you type in a value in it overwrites the "Item" field of the first record.

As I have said it seems to be completely random and sometimes happens within a few clicks sometimes lots more. Sometimes not at all! But I need to solve it as people are screwing up the data. Many thanks.
 
As I said, I couldn't reproduce the phenomenon you're reporting with your original Forms nor with the 'New' versions of them. The only thing I have noticed is that the Tab Order you have set up for navigating thru your Controls has nothing whatsoever to do with the Left-to-Right order of the Controls on the Form, which does result in the cursor taking some odd 'jumps' when tabbing thru a Record, such as going from [DeliveredDate] back to [RepairDetails]. You really need to reset the Tab Order.
 
Thanks Missindlinq.

I have found a way to replicate the error.

Open the form "Repair Input" from the Switchboard
Double click the "1" repair number on the repairs tab. This opens the repair details form.
Change the "Status" of the first item (Sprayhood) using drop down box
Then try and change the "Status" for the second Item (Mainsail).

The Focus then jumps to the "Item" control of the first record.

I hope you can replicate this.
 
Ok, I've only just had time to scrutinise your form and I can see the culprit.

In your main Orders form, in the Record Source you have a join to the Items table which is wrong. Your Items table is the Record Source of your subform so what is happening is when you change a record on the subform, the main form refreshes because of this and causes it to refresh your subform too.

So the bottom line is, remove the Items table in your main form's record source.
 
Many thanks, such a simple solution. As I said I am new to this and the help is much appreciated.

Tim
 

Users who are viewing this thread

Back
Top Bottom