I have a table with 3 fields :- ID, Class and FName,
My continuous form (which has Fname and Class fields) is bound to a query
“qryTblNameClass”
The SQL for the query is
SELECT tblNameClass.Class, tblNameClass.FName
FROM tblNameClass
GROUP BY tblNameClass.Class, tblNameClass.SName
ORDER BY tblNameClass.Class, tblNameClass.FName;
What I would like to do is to group the same class and show its running
serial number on the left of the continuous form.
I trying putting a textbox on extreme left of the the continuous form detail
section to show me the running serial number
Eg 1 Bioclass 2 John
2 BioClass 2 Peter
3 BioClass 2 Janet
1 PhyClass 1 Bill
2 PhyClass 1 Ben
1 ChemClass 1 Julie
I tried putting in the detail section a unbound textbound =[CurrentRecord]
or =Dcount( ) I got error message #Name? .
Any Idea?
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
|
|
0
|
|
|
|
Reply
|
forcefield
|
3/17/2010 2:21:02 PM |
|
hi,
On 17.03.2010 15:21, forcefield via AccessMonster.com wrote:
> I have a table with 3 fields :- ID, Class and FName,
> My continuous form (which has Fname and Class fields) is bound to a query
> “qryTblNameClass”
> The SQL for the query is
> SELECT tblNameClass.Class, tblNameClass.FName
> FROM tblNameClass
> GROUP BY tblNameClass.Class, tblNameClass.SName
> ORDER BY tblNameClass.Class, tblNameClass.FName;
SName?
> What I would like to do is to group the same class and show its running
> serial number on the left of the continuous form.
Try this:
SELECT
(
SELECT Count(*)
FROM tblNameClass I
WHERE I.Class = O.Class
AND I.FName <= O.FName
) AS GroupSeqence
O.Class,
O.FName
FROM tblNameClass O
ORDER BY O.Class, O.FName;
mfG
--> stefan <--
|
|
0
|
|
|
|
Reply
|
Stefan
|
3/17/2010 2:36:10 PM
|
|
Sorry typo error . It should be FName.
I am still trying to learn VBA. Please kindly explain what is I. Class or O.
Class . Do I copy exactly the SQL into the control source of a textbox and
do I have to replace the I and O with tblNameClass.
Thank you, Stefan, for your patience.
Stefan Hoffmann wrote:
>hi,
>
>> I have a table with 3 fields :- ID, Class and FName,
>> My continuous form (which has Fname and Class fields) is bound to a query
>[quoted text clipped - 4 lines]
>> GROUP BY tblNameClass.Class, tblNameClass.SName
>> ORDER BY tblNameClass.Class, tblNameClass.FName;
>SName?
>
>> What I would like to do is to group the same class and show its running
>> serial number on the left of the continuous form.
>Try this:
>
>SELECT
> (
> SELECT Count(*)
> FROM tblNameClass I
> WHERE I.Class = O.Class
> AND I.FName <= O.FName
> ) AS GroupSeqence
> O.Class,
> O.FName
>FROM tblNameClass O
>ORDER BY O.Class, O.FName;
>
>mfG
>--> stefan <--
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
|
|
0
|
|
|
|
Reply
|
forcefield
|
3/18/2010 12:43:41 AM
|
|
hi,
On 18.03.2010 01:43, forcefield via AccessMonster.com wrote:
> I am still trying to learn VBA. Please kindly explain what is I. Class or O.
> Class . Do I copy exactly the SQL into the control source of a textbox and
> do I have to replace the I and O with tblNameClass.
Create a new query and paste this SQL statement into it...
I and O are table alias names. You can also modify them in the design
view of a query. Select a table and open the property editor. Table
aliases are useful to write shorter easier to read SQL statements.
So I.Class and O.Class are the fields from your tblNameClass.
I is the inner sub-query for calculating the record count, O is the
outer query retrieving the records.
mfG
--> stefan <--
|
|
0
|
|
|
|
Reply
|
Stefan
|
3/18/2010 8:58:41 AM
|
|
Thank you Stefan for your help
Stefan Hoffmann wrote:
>hi,
>
>> I am still trying to learn VBA. Please kindly explain what is I. Class or O.
>> Class . Do I copy exactly the SQL into the control source of a textbox and
>> do I have to replace the I and O with tblNameClass.
>Create a new query and paste this SQL statement into it...
>
>I and O are table alias names. You can also modify them in the design
>view of a query. Select a table and open the property editor. Table
>aliases are useful to write shorter easier to read SQL statements.
>
>So I.Class and O.Class are the fields from your tblNameClass.
>
>I is the inner sub-query for calculating the record count, O is the
>outer query retrieving the records.
>
>mfG
>--> stefan <--
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
|
|
0
|
|
|
|
Reply
|
forcefield
|
3/19/2010 5:05:05 AM
|
|
|
4 Replies
247 Views
(page loaded in 0.12 seconds)
Similiar Articles: Conditional Appearance of Form Sections Based on Option/Radio ...Suppose I have a form like the one below between the ... with Adobe Acrobat Javascript (I have no problem with ... model/product name and/or number: Equipment serial number ... WinUSB - iterating devices to get serial numbers. - microsoft ...... Read serial number ... same problem. In fact, it gets a little more hairy this way because the serial number ... to get serial numbers. - microsoft ... Most of the forms ... Serial Number - Temporarily In A Query - microsoft.public.access ...... which I want to use in multiple outputs, forms ... and you want to use that order to assign the "serial" > number? ... Problem with outer join - Invalid operation (Error ... Disable auto (date) format? - microsoft.public.excel.misc ...In A3, I have a formula of the form =A1/A2/24, where A2 is time (date serial number) formatted h:mm:ss ... Format - Hi guys A lot of people seem to have this problem ... lot number quantity problem - microsoft.public.greatplains ...... lot number 1 2:- then with use existing lot/serial number ... How can I reduce the file size of my Word Form ... Development Center-Home Notice in the example problem the number ... Auto Number for Form - microsoft.public.excel.miscDear Friends, I am the new in this group, I have a problem that how to intilize the auto number ... How can I add an auto serial number to a form? - Microsoft Answers I would ... Problem with outer join - Invalid operation (Error 3219 ...... 3219)". >> >> If I change the type of joining on the serial number ... The problem is that right after opening the form the ... unmatched side of an outer join, because ... Freeze template titles - enter text in text boxes? - microsoft ...... would have, for example: Name: Rank: Serial Number ... The problem of distortion is usually handled by putting the form fields in table cells with specified ... Numbering the Records of a Query - microsoft.public.access.reports ...... to create a extra column which will number, >>in serial order, the records produced by my query. The problem is ... Continuous form record number. I have a form whose ... Start Date/End Date require multiple entries. - microsoft.public ...It is not within a form, just a simple query. Here is the SQL statement: SELECT tbl_sales.[Email Address], tbl_email.[serial number ... Problem with limiting a report ... problem in generating serial number in a vb report formhi everyone.... i am having problem in generating serial number in payroll report using vb. the report shud b like this.... sl.no. empid empname basic hra ... SolidWorks Forums: Trouble with EC form in Excel: Serial Number field... field, which will get its value from a Serial Number ... So far, so good, but here's the problem: When ... Re: Trouble with EC form in Excel: Serial Number field Problem Form - Autodesk Education CommunityWhere is my serial number? How do I get an activation code? My serial ... Education Community Support Team by filling out the form below: Tell us the nature of your problem: Help with Activation - Autodesk Education CommunityWhere can I find my serial number? I have a serial ... If so, then submit a request via our Problem Form. Be sure to include the product name, your current serial number ... CutePDF :: Support :: RequestSupport Submission Form ... Subject: Description of problem or your question: ... Your Serial Number: (or Order Number) If you have a ... 7/22/2012 7:44:55 AM
|