473,387 Members | 1,529 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.

Rearrange subform

I have a form with two subforms.
The left hand subform shows 10 records.
The right hand subform shows 10 records.
Each subform is populated from its own table/query.

I want to be able to tick boxes in the left and right subforms and have the right hand subform shuffle so that the records match.

I thank you all for any help.

Gordon
Nov 4 '06 #1
11 2139
NeoPa
32,556 Expert Mod 16PB
A clearer explanation of the problem would help people to understand.
Nov 4 '06 #2
Thanks for reply NEO.

My form has subform1 and subform2.

Subform1 is on the left.
Subform2 on the right,

Both subforms are set for continuous forms.

I want to have a tick box or similar in the records showing.

So I "tick" a record in subform1 and "tick" a record in subform2.

Then on a command button click, I want subform2 (on the right) to be sorted or arranged so that the records in both line up alongside each other.
---------------------------------------------------------------------------------------------------------------
I don't know how to explain better but here goes!

10 records on the left.
10 records on the right.

Tick a box in first record on the left,

Look down right hand records and tick the tick box in the record of choice.

After making a selection, press a command button.

Now the records on the right are rearranged so that the record on left and record on right are lined up.

I then tick a box in second record on left.

Look down right hand records and tick the tick box in the record of choice.

After making a selection, press a command button.

Now the records on the right are rearranged so that the record on left and record on right are lined up.

I do this for all records on show.
Nov 4 '06 #3
NeoPa
32,556 Expert Mod 16PB
Sorry, but I don't think there's any way of doing this.

I was interested in knowing if the data on the left and the data on the right had any info or fields in common. You can re-sort datasets and you can restrict the contents of datasets. Both of these techniques can be used to match up data.
Unfortunately, you seem to need reorganising of the data in a random (unspecified) order, with the only requisite being that an individual record must come in the specified ordinal position (it must come nth in the list).
Nov 4 '06 #4
NeoPa
32,556 Expert Mod 16PB
You might be able to do something similar, though, if you had an updatable field in each of the recordsets that you could assign a number to.
That way, the datasets could be sorted by those numbers and the left should match the right (only after you've assigned the required numbers though).
It's a bit kludgy, I know, but the only thing I could come up with.
Nov 4 '06 #5
If I have records A,B C,D,E,F down the left and A,B,C,D,E,F down the right.

I look at the left, first record is A, look down right, choose C, press command button.

Hey presto! :-)

Record A, on the left now has Record C on the right in line.

I look at the left, next record is B, look down right, choose F, press command button.

Hey presto! :-)

I now have:-

Record A Record C
Record B Record F

I make all the selections until I get to the 10th record (the last on show)

That is what I am trying to do.

I thought of putting a number or letter into a field on both sets of records and try to select on that.

I don't want to sort using ascending from the tool bar

Any Ideas welcome
Nov 4 '06 #6
PEB
1,418 Expert 1GB
But this is possible..

Yeah...

Just sort by the box that you've thicked.... And other column..

So when your boxes are all unticked so the sort will be on the other column

And when there is a thick you will need only to refresh or requery your subforms..

with the method refresh or requery

I don't see why don't you use the sort on your subforms...???

:)
Nov 5 '06 #7
But this is possible..

Yeah...

Just sort by the box that you've thicked.... And other column..

So when your boxes are all unticked so the sort will be on the other column

And when there is a thick you will need only to refresh or requery your subforms..

with the method refresh or requery

I don't see why don't you use the sort on your subforms...???

:)
--------------------------------------------------------------------------

Thanks PEB, I shall give it a try.

Gordon.(a beginner)
Nov 5 '06 #8
Each time you tick a box you could add code that would append some unique identifer to the string in the field - precede by a special character e.g A@1 then add the same to the other field C@1 . Of course the form would strip off these appended bits so the user wouldn't see them using a string function such as Left([Field1],(InStr([Field1],"@"))-1). You could then order by these appended numbers - obtained again by stripping off the 'left' bit i.e Right([Field1],Len([Field1])-(InStr([Field1],"@"))).
For the next line the code would loop to add a @2 to the strings etc
Let me know if this helps or if you solved it a different way.
Thanks
Feb 5 '07 #9
NeoPa
32,556 Expert Mod 16PB
I'm sorry but I had to edit your post to remove the link you posted as it is in violation of the rules posted at the right of the page when entering a post :-
Do not link to other websites for promoting/traffic generation. Only link to helpful resources.
Feb 5 '07 #10
Sorry I had not noticed that as I am new to this forum. I will however post my problem as a seperate thread
Feb 5 '07 #11
NeoPa
32,556 Expert Mod 16PB
That's not a problem.
A separate thread sounds like a good idea and hopefully we can find a solution or two that you haven't come across before :)
Feb 5 '07 #12

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

Similar topics

4
by: Daniel Skinner | last post by:
If I have the following text var = '1,2,3,4' and I want to use the comma as a field delimeter and rearrange the fields to read '1,3,2,4' How would I accomplish this in python?
2
by: Joăo Santa Bárbara | last post by:
Hi all, anyone knows a property in the panel to rearrange all the controls inside it ??? or a external component ? thks JSB PS: i want to put all my components inside a panel and when i...
0
by: tommazzo | last post by:
I'm currently writing a photo album sotware in C#. I'm using a ListView component to diaplay thumbnail previews of the photos and want to give the user the possibility to rearrange the photos via a...
15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
1
by: John Michael | last post by:
I have a form that has a subform that has a subform. The subform loads a record based on a combo lookup box in the main form. I'm trying to set a value in the subform based on a value in a...
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...
6
by: DMUM via AccessMonster.com | last post by:
Hello I am trying to pass the name of my subform to a function/sub but I can't seem to get it to work. I am using an autokey function (ctrl E) to unlock text boxes on a subform. I have a few...
2
by: laxwrestler27 | last post by:
Hello everyone, I'm creating a program for a courier service that takes info from a database to make a 2d array with the necessary info, then puts that on to an excel spreadsheet per delivery. ...
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
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:
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.