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

Displaying the current record

P: 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
Share this Question
Share on Google+
5 Replies


missinglinq
Expert 2.5K+
P: 3,532
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
Expert Mod 15k+
P: 31,660
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

P: 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
Expert 2.5K+
P: 2,653
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
Expert Mod 15k+
P: 31,660
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.