Re: Alphanumeric incremented number

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



[top-posting corrected...]

On Thu, 15 Mar 2007 12:49:01 -0400, "BruceM"
<bamoob@xxxxxxxxxxxxxxxxx> wrote:

"Bob Hairgrove" <invalid@xxxxxxxxxxx> wrote in message
news:dsqiv2tlucjhj1p4qf485a7v3kepahbo4m@xxxxxxxxxx
On Wed, 14 Mar 2007 13:45:44 -0400, "BruceM"
<bamoob@xxxxxxxxxxxxxxxxx> wrote:

The reason I posted the question in the first place is that I couldn't
figure out how to generate the number without storing data (the year)
redundantly. It should be possible, I agree, but I couldn't figure out
how,
so I asked a question. Asking myself the question yet again is not going
to
make the answer appear.

Check out the help topics for the Year() and the Format() functions
... that's where you will find the answers.

As my original post shows, I am familiar with the Format function. I am
also familiar with the Year function. I am familiar with quite a number of
functions, as you can infer from the code I posted. If you don't have an
answer to my question, please just say so.


OK ... I apologize if I haven't been able to get a handle on all the
requirements here. It would help to know what the existing table
structures are and what constraints (foreign keys, etc.) you now have
in place. [Also, it would help not to top-post.]

Since RepDate is already in the table, there is no need to store this
data redundantly. What I am wondering about is *WHY* you think this is
necessary? You have (presumably) all the data you need ... obviously,
you know enough VBA that you can construct a query with a calculated
field using various functions such as Format and Year (and perhaps
DatePart as well) to re-assemble the data you already have into a
user-friendly format. I'm just not sure why you find it necessary to
store the derived data at all, since you have the original data to
work with.

As to your original question, you seem to be trying to construct a
string with data from the combo box in order to insert it into the
table as a *new* record, although the rest of your question pertains
to some kind of "group search" (i.e. looking for a record which
already exists).

Care to post some DDL so that we know what the existing tables look
like and don't have to guess about things such as primary and foreign
keys, data types and nullable fields?

--
Bob Hairgrove
NoSpamPlease@xxxxxxxx
.



Relevant Pages

  • Re: format numbers
    ... and format this cell for mm:hh. ... Are you sure that the original time is 2 hours 21 mins and not 2 hours ... If that is the case, then in you spreadsheet, use a spare column to ... Copy this new column and Paste Special>Values over the original data. ...
    (microsoft.public.excel)
  • Re: Stock exchange-related data
    ... We may assume that 20 characters is more than enough to ... bytes to store "Krung Thep Mahanakhon Amon Rattanakosin Mahinthara ... Fixed length strings are ... like Rexx' format rules ...
    (comp.os.os2.apps)
  • Re: GENERATING AUTOMATIC NUMBERS
    ... I suggest you store two fields: ... > Date-auto increment format. ... Year in NN format, Julian Date in NNN format, ... I would like this feature to key off when the the preceding field, ...
    (microsoft.public.access.formscoding)
  • Re: A PC for music management and storage.
    ... access my audio system to manage and store music etc. ... MP3 format, about 1 Mb per minute, or WAV ... Hard drives are amazingly ... Bus and RAM speed may be important. ...
    (rec.music.classical.recordings)
  • Re: Sum of hh:mm:ss
    ... When you say you store it formatted, do you mean that you store it in ... In fact I defined some kind of datatype, that such a field is a text ... format, and as such stored. ... arithmatic processing, etc. based on the datatype of that field. ...
    (comp.databases.ms-access)