473,387 Members | 1,502 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,387 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 1714
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.