472,800 Members | 1,565 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

.requery with sub form

Scenary:
a main form contains two sub-form unbounded.
Sub-form "one" contains a list of products.
Sub-form "two" contains the items of the selected product.

Event:
when, from sub-form "two", it's modified type or quantity of items, I
need to execute .requery's method on sub-form "one";

Problem:
..requery's method on sub-form "one", sometimes, relists the records of
that form and changes view order; when it happened, the focus from the
selected record of sub-form "one" moves to others, and that fact make
not usable the form.

"negative" example:
sub-form "one" - inserted record "1"
sub-form "one" - inserted record "2"
sub-form "one" - inserted record "3"
sub-form "two" - modifying items
*** problem:
sub-form "one" - focus on record "2" (last position)
sub-form "one" - record 3 moved in first position


I'm not able to understand why this problem happend often and not
always, and that problem so described it's difficult to be correctly
focalized.

Some ideas about?

Bye, Gianluca

Nov 13 '05 #1
2 1675
Gianluca,

You need to 'link' the two subforms. There will be no need to requery form 'one'.
Access can do this for you ...
I think you need something like the Form 'Customers and Orders' in the sample
Northwind.mdb
Check it out.

--
Hope this helps
Arno R

"Gianluca_Venezia" <te************@yahoo.it> schreef in bericht
news:11**********************@g14g2000cwa.googlegr oups.com...
Scenary:
a main form contains two sub-form unbounded.
Sub-form "one" contains a list of products.
Sub-form "two" contains the items of the selected product.

Event:
when, from sub-form "two", it's modified type or quantity of items, I
need to execute .requery's method on sub-form "one";

Problem:
.requery's method on sub-form "one", sometimes, relists the records of
that form and changes view order; when it happened, the focus from the
selected record of sub-form "one" moves to others, and that fact make
not usable the form.

"negative" example:
sub-form "one" - inserted record "1"
sub-form "one" - inserted record "2"
sub-form "one" - inserted record "3"
sub-form "two" - modifying items
*** problem:
sub-form "one" - focus on record "2" (last position)
sub-form "one" - record 3 moved in first position


I'm not able to understand why this problem happend often and not
always, and that problem so described it's difficult to be correctly
focalized.

Some ideas about?

Bye, Gianluca


Nov 13 '05 #2
thw two subform can be linked? Never Tryed... I always use to link main
form with a subform...

however, I solved so:

parent.formone.form.refresh
and run well.

thanks
Gianluca

Nov 13 '05 #3

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

Similar topics

3
by: pbbriggs | last post by:
I will try to be as descriptive as possible, but this error has me stumped and I am not sure what relevant info to include.... I am running Access XP on a Windows XP machine. I initially began...
0
by: Michelle | last post by:
Hi all I have a main form which has a combo box and a subform. The two forms are linked by ShiftPatternName which is basically the value in the combo. the combo has the following code ...
1
by: M Wells | last post by:
Hi All, I am developing an Access 2003 project application with the back end in SQL Server 2003. I have a master form that tracks projects, and several subforms on it that track various...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
2
by: F. Michael Miller | last post by:
I need to requery a subform from a third form and can't seem to get it to work. frmForm1 has frmAddress as a subform. The button cmdReviseAddress opens the form frmUpdateAddress where all of my...
22
by: Br | last post by:
First issue: When using ADPs you no longer have the ability to issue a me.refresh to save the current record on a form (the me.refresh does a requery in an ADP). We usually do this before...
14
by: Kurt | last post by:
I have an unbound main form with an unbound subform. frmProjects fsubProjectList Using combo boxes, the user can select several search criteria on frmProjects and then click a command button....
11
blyxx86
by: blyxx86 | last post by:
I can't seem to get this figured out. I am trying to requery another form after adding new information to a table that a cboList is created from. So, I have a combo box that has Sales personnel,...
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...
2
by: Lyn | last post by:
Hi, I am using a form (FormA) to list the records in a recordset. In the FormA footer, I have an "Add" command button that opens a new form (FormB) modally which is used to input and save a new...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.