473,672 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I move the record pointer in a sub form.

Dear reader,

How can I move the record pointer in a sub form.

The sub form is a datasheet type. Both forms have the same reference key.

How can I move the record pointer in the sub form to the key field as
specified in the main form.

Tanks for any help.

Kind regards,

Simon

Feb 15 '07 #1
1 5270
Is there some reason that you aren't using the LinkMasterField s and
LinkChildFields of the Subform Control? Main Form with Subform on identical
keys is a little unusual... can you clarify?

Or, do you have a continuous forms view Form in the Subform Control and want
to "scroll" the Records? If so, in a main Form with a Subform Control named
sbfMainRel, with the matching value in Control txtMainID on the main Form,
and the corresponding unique ID in the Field of the RecordSource of the
Form embedded in the Subform Control named MainRelID, the following worked
for me to "scroll" the continuous forms view in the Form embedded in the
Subform Control. {Note: for this code, it doesn't matter what the name of
the main Form is, nor the name of the Form embedded in the Subform Control.}
Replace the name of the subform control, the name of the Text Box where the
matching value is displayed on the main Form, and the name of the Field...
then put the code in the Current event of the main Form.

Private Sub Form_Current()

Me.sbfMainRel.F orm.RecordsetCl one.FindFirst "[MainRelID] = " &
Me.txtMainID
If Not Me.sbfMainRel.F orm.RecordsetCl one.NoMatch Then
Me.sbfMainRel.F orm.Bookmark =
Me.sbfMainRel.F orm.RecordsetCl one.Bookmark
End If

End Sub

Larry Linson
Microsoft Access MVP
"Simon" <Sv********@Ver satel.nlwrote in message
news:45******** **************@ news.tele2.nl.. .
Dear reader,

How can I move the record pointer in a sub form.

The sub form is a datasheet type. Both forms have the same reference key.

How can I move the record pointer in the sub form to the key field as
specified in the main form.

Tanks for any help.

Kind regards,

Simon

Feb 15 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4622
by: Paolo | last post by:
Friends, I have created a form named FRMNEWCLIENTS whose record source is a table named NEWCLIENTS. This table has a field named FILENUMBER. I have added on the form a combobox using the third option "find a record based on my form based on the value I selected in my combobox". This is great since it allows me to open the form and use the combo to move to a selected records. My form has also two other fields named FNAME and LNAME. My...
5
24034
by: deko | last post by:
I have a subform datasheet that contains a full year of records sorted by a date field. I'm trying to programmatically move the record selector on the datasheet to the first record that matches a particular date. For example, the user clicks a button and the record selector moves to the first record that matches today's date. I was thinking something like this, but I'm not having any luck: Dim rst As DAO.Recordset Set rst =...
17
4206
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset Set rs = Me.RecordsetClone rs.Find "=" & lngContractID If Not rs.EOF Then Me.Bookmark = rs.Bookmark I must site the Heisenberb Uncertainty Principal here, as it
1
680
by: sixsoccer | last post by:
I have built a database with a <Mainform> and a <Subform>. My problem is twofold. 1. My subform is set as a continuos form with AllowAddiotions set to NO (ie. a list of Issues to the client on the mainform) 2. To add new issues, a button is used and a pop-up form is used to add an issue with more detail than what's available on the subform. 3. On accepting the new Issue from the pop-up the pop-up closes and you are returned to the...
1
2961
by: chfran | last post by:
I have a form (continuous) that show me data from a table (not a query). I can only modify and move between the data of the first record. I cannot move to the 2nd, 3rd, or 85th record, only the first. I don't know if I've turned on something unintentionally or what. Any insights? chfran
4
2011
by: Arif | last post by:
My programs searches the header of input barcode in index file. Get the record position next to Barcode header. Then moves the file pointer of products file to reach that record. My products file contains records as follows: 9N-F1T0153|002002820327|Data Switch|EA|00030900|00000 36-EPSON7753|010343600003|حنمبر طابعه 500/570|EA|00001200|00000 ER-270019|013388270019|بقتال الشارع|EA|00019900|00000
9
24663
by: Joshua.Buss | last post by:
I am trying to move a record from one linked table to another within access, but I'm a complete beginner to VBA and don't know exactly where to begin. I have an access file that has the two linked tables, which each link to separate SQL databases using separate ODBC connections. I have a form that has a view of table1 and a set of buttons for manipulating the data in database1.
16
1845
by: KayCee | last post by:
Hello All - I'm new to the community. I have been asked to move the used of a database I created from a record in a table to the corresponding record of a form. After much research and trial & error - I have come the conclution that this is not possable (please let me know if I wrong.) So to achieve what has been requested I am planning to create a form that looks just like to table the user currently looks at and some how create the link...
8
3088
by: jmarcrum | last post by:
I have a table with about 100 records. The user has the ability to click a button on the main form that will open up a "move to the next year" form. A query displays all 100 records on the continuous form. The user can then checkbox which record he/she wants to move to the next year. Here's my question.... How do i check which checkboxes were checked and ONLY move those that were checked? Also, the table that it pulls from is a linked...
0
8486
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8404
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
6238
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4418
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2819
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.