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

Can you group records within a continuous form?

50
Hi guys, probably a basic question but have been struggling for some time so thought i'd see if you could help.

I have a main schedule table which contains the fields...
Date; Machine; Arm/Head; Job Number; Stock Code; Operator; QtyPred; QtyAct

My ideal form would be a continuous one (so I can easily search through a selection of dates eg. 01/12/2008 - 09/12/2007) but need to have only one record per date. *** My problem is that the table contains many records per date. Is there any way of grouping the results of a table and then producing a continuous form based on these results.

NB I understand that I can create a qry to search machine; arm/head to LIMIT the results but then I wish to have a single record for a date containing up to 6 Job Numbers with their relevant 6 Stock Codes, 6 Operators, 6 QTYPred and 6 QTYAct.

I hope you can help me

Many thanks in advance, OllyJ
Jan 7 '08 #1
15 28847
Shalini Bhalla
190 100+
I havn't understud it properly but still , try to us subform
Jan 7 '08 #2
OllyJ
50
Thank you for your response but you cannot use subforms within a continuous form, well... at least I don't know a way round that!
Jan 7 '08 #3
jaxjagfan
254 Expert 100+
If you are just looking for sorts, this can be done with a query as a datasource for the form. If you wish to edit these records you cannot use an aggregate query (groupby, sum, count, etc).

If you are looking to show a group of records together in a continuous form the make that the subform and make a parent form that drives the group.

Post more details of the dataset in question for all to see and/or a more detailed description of what you are trying to do.
Jan 7 '08 #4
NeoPa
32,556 Expert Mod 16PB
My instinct would also be to use a subform, but if that's not possible then how about triggering (button or double-click whatever) a procedure to open a separate form related to the selected item from the main form's GROUP BY query.
The main form would have dates as single records and the separate form would be a continuous form of the items on the selected date.
Jan 7 '08 #5
OllyJ
50
Thank you for all of your timely responses.

I know what I am asking for are quite specific requirements so I shall try to explain them in more detail. (If you could add subforms to continuous forms I wouldn't have a problem at all!)

Fields in tbl_schedule are: *Cannot be changed*
Date; Machine; Arm/Head; Job Number; Stock Code; Operator; QtyPred; QtyAct

EG: 2 records in table:
1. 2.
Date: 07/01/2008 Date: 07/01/2008
Machine: MC1 Machine: MC1
Arm/Head: Arm1 Arm/Head: Arm1
Job No: 1 Job No: 2
Stock Code: PART001 Stock Code: PART002

Operator: OJ Operator: OJ
QTYPred: 12 QTYPred: 12
QTYAct: 0 QTYAct: 0

When setting out a form based on this table, 'Machine'; 'Arm/head' can be given before opening form / chosen from header to limit results.

The highlighted fields - job no and stock code vary and there can be up to 6 different job numbers / stock codes whilst the other results remain the same.

I need the results to be grouped by date so that 1 record in the form would contain (on the far left of the form) 07/01/2008 and then for record 1: 'Job No'; 'Stock Code'; 'Operator'; 'QTYPred'; 'QTYAct' would appear in the form (in editable format) as a group that would form "column 1" and record 2 form "column 2", moving right horizontally across the page. Thus meaning 1 record contained 6 groups of information for each date.

These layout requirements are to match the current method of scheduling. If that could be kept it would be great. The important thing is that it is all kept within the same form.

I hope this helps you understand which in turn helps you to hopefully help me! :)

Many thanks in advance, OllyJ
Jan 8 '08 #6
OllyJ
50
My last post might have confused some? I am still struggling with this so hope to solve it ASAP if anyone can help?

I would like to attach a basic mdb file with 1 table and 1 form to explain what im struggling with clearer but not sure how to attach a file? I don't have a browse button or alike?

Hope you can help, OllyJ
Jan 14 '08 #7
jaxjagfan
254 Expert 100+
Thank you for all of your timely responses.

I know what I am asking for are quite specific requirements so I shall try to explain them in more detail. (If you could add subforms to continuous forms I wouldn't have a problem at all!)

Fields in tbl_schedule are: *Cannot be changed*
Date; Machine; Arm/Head; Job Number; Stock Code; Operator; QtyPred; QtyAct

EG: 2 records in table:
1. 2.
Date: 07/01/2008 Date: 07/01/2008
Machine: MC1 Machine: MC1
Arm/Head: Arm1 Arm/Head: Arm1
Job No: 1 Job No: 2
Stock Code: PART001 Stock Code: PART002

Operator: OJ Operator: OJ
QTYPred: 12 QTYPred: 12
QTYAct: 0 QTYAct: 0

When setting out a form based on this table, 'Machine'; 'Arm/head' can be given before opening form / chosen from header to limit results.

The highlighted fields - job no and stock code vary and there can be up to 6 different job numbers / stock codes whilst the other results remain the same.

I need the results to be grouped by date so that 1 record in the form would contain (on the far left of the form) 07/01/2008 and then for record 1: 'Job No'; 'Stock Code'; 'Operator'; 'QTYPred'; 'QTYAct' would appear in the form (in editable format) as a group that would form "column 1" and record 2 form "column 2", moving right horizontally across the page. Thus meaning 1 record contained 6 groups of information for each date.

These layout requirements are to match the current method of scheduling. If that could be kept it would be great. The important thing is that it is all kept within the same form.

I hope this helps you understand which in turn helps you to hopefully help me! :)

Many thanks in advance, OllyJ
Looks like you want a primary form (single record) displaying a single Machine-Arm/Head combination and a subform (continuous records) that displays your table details in ascending order by date. The primary form would not be editable data.

Main form:
Expand|Select|Wrap|Line Numbers
  1. SELECT tbl_schedule.Machine, tbl_schedule.[Arm/Head]
  2. FROM tbl_schedule
  3. GROUP BY tbl_schedule.Machine, tbl_schedule.[Arm/Head]
  4. ORDER BY tbl_schedule.Machine, tbl_schedule.[Arm/Head]
Sub form:
Expand|Select|Wrap|Line Numbers
  1. SELECT tbl_schedule.*
  2. FROM tbl_schedule
  3. ORDER BY tbl_schedule.[Date],tbl_schedule.[Job No]
Link the subform to the main form on Machine and on Arm/Head. As you navigate through the main form the subform will display the details in date order and you can edit/add records. You dont need to display the Machine and Arm/Head fields in the subform (just include them in the recordset)

If you need to add new machines and/or arm/heads I recommend using another form.

Hope this helps,
Jan 14 '08 #8
OllyJ
50
Thank you, I think i understand that... but im now having issues with layout and a specific layout is required from the final user. I have this layout shown clearly on an unbound form, is there a way to attach a small database on here?
Jan 14 '08 #9
OllyJ
50
Think this should contain attachment... never done it before!

this should help explain.... any help will be greatly appreciated on how i could achieve this layout and still allow editable controls that relate to specific records in an underlying table.

Any help will be greatly appreciated! Thanks, OllyJ
Attached Files
File Type: zip schedule eg 14.01.08.zip (63.1 KB, 638 views)
Jan 14 '08 #10
jaxjagfan
254 Expert 100+
Think this should contain attachment... never done it before!

this should help explain.... any help will be greatly appreciated on how i could achieve this layout and still allow editable controls that relate to specific records in an underlying table.

Any help will be greatly appreciated! Thanks, OllyJ
Thanks - this will help. You may have to be more flexible with the layout. You will not be able to lay the records side by side as you have displayed. I will mockup a form and repost.

Revised version uploaded here.
Check out the main and sub forms. I added a few records to test. The sub opens within the main form. Use the combo box to navigate.

I noticed you had labels for day and night. Within the DateAdded field, are the users entering date and time? Or should the day/night field be editable as well (I have it so in my sub).

This is very rudimentary but it should get you past your current dilemma.
Attached Files
File Type: zip schedule eg 14.01.08_revised.zip (70.8 KB, 854 views)
Jan 14 '08 #11
jaxjagfan
254 Expert 100+
Check out my previous revised post and upload.
Jan 14 '08 #12
OllyJ
50
Thanks very much for your help. I have looked through your revised version, it is something I shall definitely consider using. However, before i commit, are you (or any expert friends) aware of a method of getting the results side by side no matter how complex the code? I appreciate that this is a big ask but I have been asked to try and do everything I possibly can to get it into this format so that it is the same layout as the spreadsheet being used currently.

If you can help with that it'll be great (even if it means using a single form somehow / adjusting the table slightly maybe?)

If this is impossible, I am pretty sure I shall use the method you sent so thank you once again.

NB Day/Night is not chosen just presented on the form.

OllyJ
Jan 15 '08 #13
OllyJ
50
Jaxjagfan... I have been thinking and with some moderations, I think I could run with the method you kindly showed me.

Here is a list of 'ideals' that I would need in place in order to use the continuous subform, I have been looking at some of these today and have struggled. If you could assist me in any way with these it'd be great...

1. User needs to filter numerous times from controls within the header of the main form i.e. Filter the date down and then from what's remaining, filter again, and again ... is this possible?

2. The first filter would need to be date so from the header in the drop down box there could be a combo with 'this week'; 'next week'; 'this month' etc. when selected the subform should filter.

When doing week do you do 'between'?...as I know that
- First of week =Datediff("d",Weekday(Date()-1,2),Date())
- Last of week =Datediff("d",Weekday(Date()-1,1),Date())+6

3. The following controls would limit the list of results within the continuous form further, i.e. 'machine'; 'arm/head'; 'operator' etc.

You can probably see where i'm going with this. My problem is that i'm struggling with the basics of limiting the continuous subform from the header of the main form... and i'm also finding the coding of the dates a particular struggle.

Again, any help on this will be greatly appreciated.

OllyJ
Jan 15 '08 #14
jaxjagfan
254 Expert 100+
The easiest way to implement filters is to train the end users about the capabilities of MS Access. I taught some of my end-users about that here at work and they loved it. For some it has become the predominate way they drill down to the data they want to see.

If you right-click on a field (in a form or in a table), one of the options you will see is filter by selection (in the case of your date in the subform - it would narrow down (filter) the list to just the date selected.

Another option from right-click is "Filter For:". This allows the end-user to enter custom criteria such as >=1/1/2008 or Between 1/1/2008 and 1/5/2008.

To remove filters, just right click again and choose "Remove Filter/Sorts".

This will remove ALL filters - not just the last one done.
Jan 15 '08 #15
OllyJ
50
I understand what you're saying regarding teaching them about how to use access and filtering and have previously put that forward (as I knew it would save me time) but i've been told i need to reduce the end user's scheduling time as much as possible, hence unfortunately i do need to limit from the header of the main form.

Any ideas...?

Do you set filters to the continuous subform and then on update of a combo box set if (x is selected) then me.subform.filter = true????
Jan 16 '08 #16

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

Similar topics

1
by: Robert | last post by:
Need some help with this please. Is there a way to display more than one record at a time on a popup form? I have a main form that has a button that triggers a popup form that is a continuous...
2
by: David | last post by:
Hi, I have an order form which has a field 'ProductID'. This form has a button on each record to open a new form linked by ProductID. This new form is a continuous form and obviously, only...
2
by: Rob | last post by:
Is there a faster/cheaper way to determine the number of records being displayed in a continuous form? I always did: dim rs as dao.recordset set rs = me.recordsetclone if rs.recordcount = 0...
1
by: phaddock4 | last post by:
Being fairly inexperienced at Access 2000, i've been reading many posts here for the last several days, and testing myself to find the best approach to do the following in A2K: SET UP: I have...
3
by: Richard Hollenbeck | last post by:
I have the following query in my form's code: Private Function Get_Data(fieldNum As Integer) Dim strSQL As String Dim db As DAO.Database Dim rs As DAO.Recordset strSQL = "SELECT & "", "" & ...
3
by: Stewart | last post by:
Hi all! My (relatively small) database holds data on staff members and the projects (services) that they are assigned to. In my form frmStaff, I have a list of staff members - it is a...
1
by: NumberCruncher | last post by:
Hi All, I am struggling with setting up my first system of tables, forms,and reports, and could use your help! I am setting up a database to keep track of the production of a produced item. The...
4
by: virtualgreek | last post by:
Dear All, First of all I would like to take the time to thank you all for your efforts and time spent at this wonderful forum. I have found it very helpful with numerous examples available for...
1
by: MikiEns | last post by:
Hi all, Please excuse me if this is incorrect I am new to MS access and this Forum and appreciate any advice on posting. I would Like the Tab key on the key board to take the cursor down...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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:
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...

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.