Talk About Network

Google





Software > Access Forms > Re: Use record ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 44672 of 46786
Post > Topic >>

Re: Use record number of subform to assign letters

by =?Utf-8?B?QWNjZXNzIE5ld2JpZSBOaWNr?= <AccessNewbieNick@[EMAIL PROTECTED] Aug 8, 2008 at 02:39 PM

Thanks for your reply,

However i think there are a couple of problems due because there is no 
actual field with the name  [Record Number]: I mean the number that is on
the 
navigation bar at the bottom of the subform. This value has to come from
the 
subform itself as the underlying query contains all records for each value
in 
the main form, also autonumber would create gaps.
Either that or letter the records beggining with A, beggining at A again
at 
every time a new [PO Main ID] (the linked field to the main form) value 
arises in the underlying query.
The latter would be the most beneficial.
I am aware that probably i havent explained it well so any thing that you 
may need to know please ask!

Thank you again Ken.

"Ken Snell (MVP)" wrote:

> Assuming that you're using a query as the subform's RecordSource, add a 
> calculated field to the query that will give you the desired letter:
> 
> SELECT ID, [Record Number], Chr(63 + [Record Number]) AS Letter
> FROM YourTableName
> ORDER BY [RecordN Number];
> 
> -- 
> 
>         Ken Snell
> <MS ACCESS MVP>
> 
> 
> "Access Newbie Nick" <AccessNewbieNick@[EMAIL PROTECTED]
> wrote
in 
> message news:0E72520B-5B74-4712-A414-8A9D1BAD93E5@[EMAIL PROTECTED]
> >I have a subform in which each record has a letter starting from A and
> > preceding alphabetically. I want to make it so that if one record in
the
> > subform is deleted, the letters will automatically change to
accomodate it
> > with no gaps.
> >
> > For example
> >
> > ID       Record Number(in subform)      Letter
> > 34                   1                                        A
> > 35                   2                                        B <-----

> > delete this record
> > 36                   3                                        C
> >
> > then goes to
> >
> > ID         Record Number(in subform)     Letter
> > 34                     1                                      A
> > 36                     2                                      B  
<------- 
> > auto changed assigned letter
> >
> > Any help given would be great!
> >
> > Thanks 
> 
> 
>
 




 5 Posts in Topic:
Use record number of subform to assign letters
=?Utf-8?B?QWNjZXNzIE5ld2J  2008-08-08 07:39:01 
Re: Use record number of subform to assign letters
"Ken Snell \(MVP\)&q  2008-08-08 12:34:58 
Re: Use record number of subform to assign letters
=?Utf-8?B?QWNjZXNzIE5ld2J  2008-08-08 14:39:01 
Re: Use record number of subform to assign letters
"Ken Snell \(MVP\)&q  2008-08-09 11:50:28 
Re: Use record number of subform to assign letters
=?Utf-8?B?QWNjZXNzIE5ld2J  2008-08-11 04:00:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 14:06:46 PST 2009.