473,396 Members | 2,158 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,396 software developers and data experts.

How to assign certain data in a pattern?

My question is basically how would I be able to assign certain data automatically in a pattern (i.e. If employee1 is Alpha, employee2 is Bravo, employee3 is Charlie so on and so forth). How would I go about this?
Aug 20 '10 #1
9 1813
munkee
374 256MB
In what context would you like to be assigning the data?

Do you mean everytime you add an employee in to a table they get assigned a unique "Code name"?
Aug 20 '10 #2
No I mean after the employees are already inputed, I sort them by Last Name Alphabetically, and then by Gender (Male and Female of course) Then all I have to do is click a button to assign a company, by going down the list... Alpha, Bravo, Charlie, Delta, Echo etc...
Aug 20 '10 #3
Rather VBA will assign them a company after I click a button.
Aug 20 '10 #4
NeoPa
32,556 Expert Mod 16PB
Jonathan, You need to be more specific in your responses and your question originally.

Do you mean that there will be a field in your table to hold the assignment of the record to a Greek letter from Alpha to Omega and that each time you click the button the next value in the sequence is assigned to the current record?

Would the sequence start at Alpha every time the form is opened?

Without this information we are only guessing what you mean. We may generally be good at that, but it's not clever to rely on it. It does waste so much of everybody's time after all.
Aug 20 '10 #5
Pardon my not so descriptive question. This is whats happening....

I have a database of my soldiers. As I enter a 'New Soldier' into the system, I want Access to assign certain data automatically in a sequence pattern. In this company assignments, A, B, C so on and so forth. (We are not using Greek letters. Alpha, Bravo, Charlie etc... are military letters.)

Example... If SoldierA was assigned Alpha Then
SoldierB is assigned to Bravo
so on and so forth.

Hope this is more explanatory then before.
Aug 21 '10 #6
NeoPa
32,556 Expert Mod 16PB
Jonathan:
Hope this is more explanatory then before.
Only in as much as I now recognise (as I should have before to be fair) that you are using phonetic alphabet rather than the Greek one. Charlie was the giveaway, but I missed it.
  1. Otherwise, how are we supposed to know what you mean by SoldierA?
  2. When is the sequence reset?
  3. What is expected to happen when the sequence attempts to go past Zulu?

Unfortunately, instead of responding to my post with the questions in it directly, you have attempted to describe the situation again from scratch. A successful attempt would have allowed us to proceed regardless, but this leaves us right back at first base I'm afraid. If you respond directly we can certainly make progress.
Aug 23 '10 #7
What I want Access to do is using only a set letters (A through E), going through each record in squence, then resets back to A. So for every new soldier (or record), the soldier will be assigned to one of the companies A, B, C, D, or E (based off of the previous record.) So in otherwords if the previous soldier was assigned A, then the next will be assigned B, then C all the way to E. Once E has been assigned then the squence resets back to A. I hope this clearifies a little better.
Aug 24 '10 #8
Its like AutoNumber except with letters, and it resets after the fifth letter, (Letter E in this case). I think this explains alot, considering I just figured it out.
Aug 24 '10 #9
NeoPa
32,556 Expert Mod 16PB
I've numbered the questions in post #7 so we can refer to them unambiguously.

It seems that Qs 2 & 3 are fully covered by your post #8. Where we still have confusion is in Q1. This is probably due to a quite common misunderstanding about databases where people tend to assume that the data is stored in a way similar to how it is seen in a grid, or in an Excel worksheet.

If you think of the data being stored instead in a bucket, where all the data is jumbled up, then you have a clearer picture of how it works. The process of getting the data back out is where any ordering or sequencing is applied. I could ask for that data ordered by one field, then SoldierA would refer to one record, but I could also ask for it ordered by another, then SoldierA would refer to a completely different record.

When I ask then, what determines how we recognise SoldierA, I need not only to know that it is the first in the sequence, but also what that sequence is. This is even more important when we get on to trying to determine what the previous record was at any point, as opening the database on any day will need to determine that information before it is in any position to assign a new value to the next record entered.

I'm assuming for now, that you are looking to maintain a dataset such that any new record added via a form can have the value of this field determined as it is saved away. Please let me know if that is a correct assumption, or whether you are intending a retrospective bulk update (which would require SQL work and a whole different approach).
Aug 24 '10 #10

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

Similar topics

3
by: Oliver Stratmann | last post by:
Hello All! I'm looking for a description of the needs of space for a certain data-type. How much space does e.g. a NUMERIC(1,0)- field take? (??? Bytes?) Is there a listing in the...
5
by: MX1 | last post by:
Here's an interesting one. I have a database that has user level security invoked. The design is normalized and I have one field in particular called Rep ID. Any thoughts on how I can allow all...
0
by: cdbiggs | last post by:
I've got a website, written in ASP.Net 1.1, that displays a workschedule. I'm using a disconnected DataSet to display certain fields in a DataGrid. Data fields are: Start Date - Start Time -...
0
by: bay_dar | last post by:
I have an ASP.NET application with vb that I would like to use a confirmation box with, but only if certain conditions are met. In my case I would only want this msgbox to show up if a user entered...
1
by: xixi11 | last post by:
Hi I wanted to sum data in one field and output the data in another new field. For example, my data item is like this: clientId form location value 1111 1 2 22.5 1111 ...
2
by: enambo | last post by:
In MS Access, i would to give the locking system to certain user, by which they can enable or disable to work on certain data entry or reports. How can i work on that? Kartik
11
by: cindyfaith | last post by:
I have one question regarding a code I wrote to parse a data file My code looks like this open($FILE, "C:\\data\\NCI sample.txt") or die "oh oh can't open"; open(OUT,...
5
by: keeps21 | last post by:
Ok, so here goes. I need to retrieve data, (ie. id, title, introtext.) from my database and store each in a variable. I then need to repeat this for the next 4 records. So I would have 5...
1
imrosie
by: imrosie | last post by:
Hello All, I have a combo box that selects a customer and brings up all of the data associated with that customer (Billing data (on Main form), Order data (on Sub form #1) and Shipping Data on Sub...
4
by: Prodian | last post by:
Im trying to parse a recv from a telnet session then only grab certain data. Heres an example of the recv that Im storing into a string: Internet 204.189.124.205 0 001a.a01f.4e5a ...
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: 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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.