472,358 Members | 1,643 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 1550
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,511 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,511 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

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

Similar topics

4
by: Bryan | last post by:
I have a results table that is 5 columns wide. the recordset is returned with 48 items. I have no problem displaying 5 per row until I hit the last row where i get a ADODB.Field error '80020009' ...
5
by: tdmailbox | last post by:
I have a form with a child form. In the child form there is a list of names that can grow quite large. On the parent form I want to display the first name from the child form. I set up a test...
9
by: MLH | last post by:
I have a database (datatrek.mdb) with a table named DATA. The table has a date/time field with default value = Now(). It has 100 records in it entered over a 50-minute period. I would like the...
9
by: Susan Bricker | last post by:
Greetings. I am having trouble populating text data that represents data in my table. Here's the setup: There is a People Table (name, address, phone, ...) peopleID = autonumber key There...
3
by: Typehigh | last post by:
I am a good programmer, but this one stumps me! I have a form with a continuous subform. The continuous subform contains records of data and may reach a depth of 1000's of entities. I have...
2
by: Robert | last post by:
I have a label on my form lblCount and the following code in my form for displaying a record count: Private Sub Form_Current() Me.RecordsetClone.Bookmark = Me.Bookmark Me!lblCount.Caption =...
1
by: NumberCruncher | last post by:
Hi All, I am struggling with setting up my first system of tables, forms,and reports, and could use your help! I am setting up a database to keep track of the production of a produced item. The...
2
by: Vinda | last post by:
There was a thread from November 12th, 2005 03:51 PM discussing displaying the current record's record number on a form. Wayne replied to the query that it was possible using the code ...
2
by: clickingwires | last post by:
How would I go about displaying the current record value in a label? This is the code I'm using and all I get is "1" in the label Dim rst As New ADODB.Recordset Dim cnn As New ADODB.Connection...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...

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.