473,396 Members | 1,970 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 1621
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,556 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,556 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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.