A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Primary Field Value calculation and insertion



 
 
Thread Tools Display Modes
  #1  
Old February 19th, 2009, 03:46 AM posted to microsoft.public.access.tablesdbdesign
MMWC
external usenet poster
 
Posts: 2
Default Primary Field Value calculation and insertion

I currently run an application in Excel which is now too RAM heavy to remain
fast and efficient. There is much functionality built into this Spreadsheet
which is dead easy to do – just get into the cell of your choice and go crazy
with expressions statements etc. So much so, there is very little actual VBA
written into the application.
Now I am trying to get the same functionality into Access, a different
animal and very clunky to the uninitiated. I was told that I would not need
to use much VBA in Access either, because there are “ways” to get around it.
So I am keen to see this and ask the Access cohorts out there to please show
me the light.
This particular thread requires that my Primary key contains variable
prefixes –

example:
If my field contains parts like Widgets, Gadgets and Gizmos the first 3
letters are use as a prefix. If a new record refers to a widget, Access is
required to seek out the highest assigned widget number and then add 1 – so
upon saving (exiting) the record the primary field must find all WID prefix
numbers (say 0876) and add 1 to = 0877 and complete the field insertion with
the result “WID0877”

Which is the easiest way to achieve this result (via Query, field
expression, function, macro, combination, etc) please?

Many thanks for your time and assistance
  #2  
Old February 19th, 2009, 04:23 AM posted to microsoft.public.access.tablesdbdesign
Barry A&P[_2_]
external usenet poster
 
Posts: 119
Default Primary Field Value calculation and insertion

I am by no means qualified to give this advice but i have seen discussions on
this before and most suggest seperate Fields for the prefix and Number then
maybe with a query limit Prefix to "WIDGET" and do a MAX on the Number
Column. Just an Ignorant Tidbit..

"MMWC" wrote:

I currently run an application in Excel which is now too RAM heavy to remain
fast and efficient. There is much functionality built into this Spreadsheet
which is dead easy to do – just get into the cell of your choice and go crazy
with expressions statements etc. So much so, there is very little actual VBA
written into the application.
Now I am trying to get the same functionality into Access, a different
animal and very clunky to the uninitiated. I was told that I would not need
to use much VBA in Access either, because there are “ways” to get around it.
So I am keen to see this and ask the Access cohorts out there to please show
me the light.
This particular thread requires that my Primary key contains variable
prefixes –

example:
If my field contains parts like Widgets, Gadgets and Gizmos the first 3
letters are use as a prefix. If a new record refers to a widget, Access is
required to seek out the highest assigned widget number and then add 1 – so
upon saving (exiting) the record the primary field must find all WID prefix
numbers (say 0876) and add 1 to = 0877 and complete the field insertion with
the result “WID0877”

Which is the easiest way to achieve this result (via Query, field
expression, function, macro, combination, etc) please?

Many thanks for your time and assistance

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:32 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.