473,320 Members | 1,957 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,320 software developers and data experts.

to stop subform requery when after update textbox

2
I have a form which has subform. when i type something on subform. and textbox has after update function which make main form field requery. and the same time it makes subform requery. and moves to first record. How can i stop subform requery
Oct 1 '15 #1
3 1737
hvsummer
215 128KB
I think you have to cut the link master-child form to stop that.
But you'll have to code more VBA scripts to manual doing what you want.
Oct 1 '15 #2
Qiyas
2
if i open the form not from another form it works ok. but if i open form by clicking on the another form it makes requery and goes to first record on the subform
Oct 1 '15 #3
jforbes
1,107 Expert 1GB
In response to the first post, I'm pretty sure there isn't a way to stop a Subform from requerying when the Parent Form is Requeryed since requerying causes all controls on the Parent Form to be requeryed and the Subform is a control on the Parent Form.

A couple ways around this is to either Requery specific controls on the Parent Form or by letting the Requery take place on the Subform and then focusing back on the record that you were previously on.

Here is a code snippet that I've used to Move back onto a record after requerying a SubForm:
Expand|Select|Wrap|Line Numbers
  1. Dim lCurrentID As Long
  2. lCurrentID = Me![LineItemID]
  3. ... Do some Stuff ...
  4. Me.Requery
  5. With Me.RecordsetClone
  6.     .FindFirst "LineItemID=" & lCurrentID 
  7.     Me.Bookmark = .Bookmark
  8. End With
Hope it helps
Oct 2 '15 #4

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

Similar topics

1
by: Johnny Meredith | last post by:
I have an unbound main form (one side) with a subform (many side). The main form has a textbox control on it whose visible property is set to false. It's controlsource property is a reference to...
2
by: Rich | last post by:
Hello, I need to trap/detect when a textbox is entered via the tabkey. If the textbox is not empty when entered via the tabkey then set focus to next textbox. To enter that textbox would then...
3
by: colleen1980 | last post by:
There are two continuous subforms in main form. All are linked with ticketNum. When user comes to subform2. I need that Field3 of subform2 will automatically filled with field2 (field2 is a...
11
by: mrowe | last post by:
I am using Access 2003. (I am also using ADO in the vast majority of my code. I recently read a post that indicated that ADO is not all that is was initially cracked up to be. In the back of my...
18
Mohan Krishna
by: Mohan Krishna | last post by:
Hello everyone! I am using VB 6 on Windows XP. I tried to show a form named "prodListFrm", when a textbox named "prod1Txt" placed on another form named "customerFrm". But, it is happening that...
10
by: AdrianGawrys | last post by:
Hi guys, I recently rewrote onClick procedure for Calendar on my form (frmRota). It opens record from tblRotas where field rDate is equal the one selected on Calendar. If such a record doesnt exist...
7
by: robert.waters | last post by:
I have an Access database frontend linked via ODBC to a large (gigabytes) mysql database. I need to view a large amount of data in a a textbox (variable up to 300K), but I receive a 'there isnt...
2
by: slao | last post by:
I am unable to get the updated value of textbox within a listview when "Update" link button is clicked which calls a function. <asp:ListView ID="_lvCartItems"...
7
by: bbobely | last post by:
Hi, I've built a sequence that works thusly: User chooses a value from a combo box. This causes a query to run displaying records with a field value matching the combo box in subform 1. Then, the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.