By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,611 Members | 1,712 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,611 IT Pros & Developers. It's quick & easy.

cannot navigate / edit subform beyond first record

P: 5
I have one unbound form which contains two subforms.
The record source of the first subform is a table containing transaction headers.
The record source of the second subform is a table containing transaction lines.
The link between the two tables is the Transaction identifier: relationship is one (in headers) to many (in lines)
The selection works perfectly - it shows all lines associated with a particular header in the second subform.

Problem: I can select and edit the first line of the second subform, but I cannot select or edit any subsequent lines although they do show up (though oddly, I can edit a boolean field in those subsequent lines). The cursor simply jumps back to the first line.
Nov 22 '11 #1
Share this Question
Share on Google+
9 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
What version of Access are you using?

Are these forms you have created yourself?

Is there any code or macros behind any of the forms or controls?
Nov 22 '11 #2

P: 5
Access 2003, and I did create the forms myself.
The only code associated with this form is a Docmd.Openquery which runs an append query which adds a new transaction line for the transaction header selected if required by a user.
These new lines then share the same Transaction identifier so they show up correctly in the transaction lines form (but as mentioned, can't navigate or edit them)
Nov 22 '11 #3

P: 5
Some more information:
If I sort the transaction line records differently in the form, I can edit the line on top.
What it looks like doing is that it refocuses the cursor on the first line after every click in the transaction lines subform - that also explains why I can edit the Boolean (since that is one click). Is there a way around this?
Nov 22 '11 #4

NeoPa
Expert Mod 15k+
P: 31,712
Typically (and most straightforwardly) such a scenario would be handled by a bound main form (for the headers) and an associated bound subform (for the lines). Is there any reason why you've chosen a different approach?
Nov 23 '11 #5

P: 5
Reason was that I wanted to show both headers and lines as datasheets, so users can easily browse transactions, select one and then view the associated lines. Processing is not linear, user sort and filter by different criteria depending on the available source documents (screenshot attached)

Attached Images
File Type: jpg invoice menu.jpg (46.6 KB, 832 views)
Nov 23 '11 #6

NeoPa
Expert Mod 15k+
P: 31,712
Is it not possible to do that the normal way? I see nothing in your explanation that indicates your chosen approach has anything to offer over the normal one :-S
Nov 23 '11 #7

P: 5
Do you mean as a form + datasheet subform rather than as a form with two linked datasheet subforms? I would prefer not to as it is much easier to navigate in a datasheet given the way users interact with it in this particular business model.
Nov 23 '11 #8

NeoPa
Expert Mod 15k+
P: 31,712
No. I was being dim as I haven't actually tried to work with subforms within a datasheet form before (which was what I was enquiring about). I guess it wouldn't make sense as a subform control wouldn't be shown when the form is in datasheet mode. I think that was the answer I needed from you, but never mind. Forget I asked. As I say, that's not an area I'm very familiar with.
Nov 23 '11 #9

TheSmileyCoder
Expert Mod 100+
P: 2,321
The behavior you are describing is, as far as I know, not standard. I can only guess that you have some code/macro being triggered that cause this, such as a requery.

It may be triggered from some sort of Got/lost focus event, or from something else. I would suggest you look over the events in your form(s), and check them for macros, or VBA code.
Nov 23 '11 #10

Post your reply

Sign in to post your reply or Sign up for a free account.