468,134 Members | 1,262 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,134 developers. It's quick & easy.

Displaying the current record

18
Hi, I am working on a database. I have created a main form and three linked forms. When I enter an ID in the main form all the related information is also displayed on the linked forms. The problem is, when I enter ID the related information is displayed in the subform but when I close the subform, in the main form the record displayed is the very first record of the table, not the current record. What I want is when I close the subform it should display the same record not the first record. Any suggestion on this will be of great help to me. Thanks.
Aug 6 '07 #1
5 1374
missinglinq
3,532 Expert 2GB
You have inadvertently posted your question in the Articles section rather than in the Forum section of our site, so I have moved it across to the Forum for you.

Linq ;0)>
Aug 6 '07 #2
NeoPa
32,036 Expert Mod 16PB
Hi, I am working on a database. I have created a main form and three linked forms. When I enter an ID in the main form all the related information is also displayed on the linked forms. The problem is, when I enter ID the related information is displayed in the subform but when I close the subform, in the main form the record displayed is the very first record of the table, not the current record. What I want is when I close the subform it should display the same record not the first record. Any suggestion on this will be of great help to me. Thanks.
It may help to know what you mean by linked forms and subforms. Subforms can't be closed separately from the main form so I know they're not what you have in mind. I won't be able to help unless you clarify your terms I'm afraid.
Aug 6 '07 #3
130975
18
I am so sorry missinglinq for my mistake and thanks for redirecting my question to the Forum. Let me make more clear. I have a main form with some basic details and a ToggleLink to open a Child form. Employee is the main form and Email_ID is the child form. I linked the child form's Default Value =[Forms]![Employee]![Emp_Code]. When I search the main Employee form and enter an ID, child form shows up the related information. But the problem is when I close the child form and return to main form, it displays the very first record not the current record. I hope I have drafted my question correctly. Kindly help. Thanks.
Aug 7 '07 #4
FishVal
2,653 Expert 2GB
I am so sorry missinglinq for my mistake and thanks for redirecting my question to the Forum. Let me make more clear. I have a main form with some basic details and a ToggleLink to open a Child form. Employee is the main form and Email_ID is the child form. I linked the child form's Default Value =[Forms]![Employee]![Emp_Code]. When I search the main Employee form and enter an ID, child form shows up the related information. But the problem is when I close the child form and return to main form, it displays the very first record not the current record. I hope I have drafted my question correctly. Kindly help. Thanks.
Hi.

This happens because you invoke [Forms]![Employee].Requery method. I think in your case there is no reason to do this as no records were added to the main form RecordSource.
If some control on the main form (e.g combo or listbox) has e-mails list as RowSource you need just to call Requery method for this particular control.
Aug 7 '07 #5
NeoPa
32,036 Expert Mod 16PB
I am so sorry missinglinq for my mistake and thanks for redirecting my question to the Forum. Let me make more clear. I have a main form with some basic details and a ToggleLink to open a Child form. Employee is the main form and Email_ID is the child form. I linked the child form's Default Value =[Forms]![Employee]![Emp_Code]. When I search the main Employee form and enter an ID, child form shows up the related information. But the problem is when I close the child form and return to main form, it displays the very first record not the current record. I hope I have drafted my question correctly. Kindly help. Thanks.
I'm assuming (you still use undefined terms ToggleLink & Child form) that what you're trying to tell us is that you have a form ([Email_ID] - by design unconnected to the main form - [Employee]) which is opened from code within an event procedure of the main form. This may be triggered by something the operator selects on that form.
If all that is a true and accurate understanding of what you're saying, can you let us know what code is run that effects the main form after opening the other ([Email_ID]) form? I think this is what FishVal is referring to - but we don't have access to that important information so we're in the dark to a certain extent.

BTW Don't see this as being critical. I appreciate you're trying to share the right information but that can be very difficult to determine sometimes - hence I'm trying to point you in the right direction :)
Aug 7 '07 #6

Post your reply

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

Similar topics

27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.