473,396 Members | 1,998 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.

Using pre-assigned case numbers

Hello and Thanks in advance for any help.

I have been tasked with rewriting a christmas assistance database
using Access 2003. The old system used pre-assigned case numbers to
identify applicants applying for assistance (with a specific date and
time).

I have created an applicant table and form, PK is an autonumber,
CaseNbr is long integer, applicant name/address etc.

I have created a case number table, PK is autonumber, case number is
long integer, appt date/time as date time fields and an assigned date
as date field.

I need to look up the first unassigned case number, assgn this case
number, date/time to the applicant and then mark this case number as
assigned.

I can look up the case number in a query using first in the total row,
but cannot figure out how to generate the code to do the updates and
call everything with a command button.

I did something similar using DMAX for a batch number, but didn't have
to save any info, this scenario needs to use the preassgned numbers.

Any help would be greatly appreciated.

Liz

Oct 8 '07 #1
3 2075
Is this a single-user application, or are there multiple concurrent users?

If single user, or with appropriate use of transactions, you can use the
DMAX approach to create a new Case Number. Use DMAX against the Applicant
table... that will get you the highest number used, and you'll increment it
to be the Case Number for the new applicant.

Larry Linson
Microsoft Access MVP
<em**********@comcast.netwrote in message
news:11**********************@r29g2000hsg.googlegr oups.com...
Hello and Thanks in advance for any help.

I have been tasked with rewriting a christmas assistance database
using Access 2003. The old system used pre-assigned case numbers to
identify applicants applying for assistance (with a specific date and
time).

I have created an applicant table and form, PK is an autonumber,
CaseNbr is long integer, applicant name/address etc.

I have created a case number table, PK is autonumber, case number is
long integer, appt date/time as date time fields and an assigned date
as date field.

I need to look up the first unassigned case number, assgn this case
number, date/time to the applicant and then mark this case number as
assigned.

I can look up the case number in a query using first in the total row,
but cannot figure out how to generate the code to do the updates and
call everything with a command button.

I did something similar using DMAX for a batch number, but didn't have
to save any info, this scenario needs to use the preassgned numbers.

Any help would be greatly appreciated.

Liz

Oct 8 '07 #2
On Oct 8, 4:16 pm, "Larry Linson" <boun...@localhost.notwrote:
Is this a single-user application, or are there multiple concurrent users?

If single user, or with appropriate use of transactions, you can use the
DMAX approach to create a new Case Number. Use DMAX against the Applicant
table... that will get you the highest number used, and you'll increment it
to be the Case Number for the new applicant.

Larry Linson
Microsoft Access MVP

<emalcolm_...@comcast.netwrote in message

news:11**********************@r29g2000hsg.googlegr oups.com...
Hello and Thanks in advance for any help.
I have been tasked with rewriting a christmas assistance database
using Access 2003. The old system used pre-assigned case numbers to
identify applicants applying for assistance (with a specific date and
time).
I have created an applicant table and form, PK is an autonumber,
CaseNbr is long integer, applicant name/address etc.
I have created a case number table, PK is autonumber, case number is
long integer, appt date/time as date time fields and an assigned date
as date field.
I need to look up the first unassigned case number, assgn this case
number, date/time to the applicant and then mark this case number as
assigned.
I can look up the case number in a query using first in the total row,
but cannot figure out how to generate the code to do the updates and
call everything with a command button.
I did something similar using DMAX for a batch number, but didn't have
to save any info, this scenario needs to use the preassgned numbers.
Any help would be greatly appreciated.
Liz- Hide quoted text -

- Show quoted text -
Thanks Larry, this is a multiple concurrent users application. The
case numbers have to run between 1001 and 1370 for the first date with
30 numbers used every 15 minutes, when 1370 is assigned the case
number has to change to 2001 and run up to 2450, then change to 3001
and run up to 3370. The preassigned numbers correspond to the date and
time the applicant comes to received their Christmas assistance.

Oct 9 '07 #3
You should be able to do this in code... using a transaction or
self-implemented locking approach; this is what I'd try as a start.

Call the code that implements your algorithm, Begin a Transaction, Read the
most recent Case Number, create the new one according to your algorithm,
write the new Case Number back to the Case Number table, End the
Transaction, and return the Case Number you calculated to the user.

You might be able to do it a little easier by using a Table Lock on your
Case Number table.

I worked on an application where we did something similar (though it was
just a monotonically increasing unique id) with a server database, with the
new id function implemented as a stored procedure and accessed via a
passthrough query.

Larry Linson
Microsoft Access MVP

<ma********@gmail.comwrote in message
news:11*********************@o80g2000hse.googlegro ups.com...
On Oct 8, 4:16 pm, "Larry Linson" <boun...@localhost.notwrote:
>Is this a single-user application, or are there multiple concurrent
users?

If single user, or with appropriate use of transactions, you can use the
DMAX approach to create a new Case Number. Use DMAX against the
Applicant
table... that will get you the highest number used, and you'll increment
it
to be the Case Number for the new applicant.

Larry Linson
Microsoft Access MVP

<emalcolm_...@comcast.netwrote in message

news:11**********************@r29g2000hsg.googleg roups.com...
Hello and Thanks in advance for any help.
I have been tasked with rewriting a christmas assistance database
using Access 2003. The old system used pre-assigned case numbers to
identify applicants applying for assistance (with a specific date and
time).
I have created an applicant table and form, PK is an autonumber,
CaseNbr is long integer, applicant name/address etc.
I have created a case number table, PK is autonumber, case number is
long integer, appt date/time as date time fields and an assigned date
as date field.
I need to look up the first unassigned case number, assgn this case
number, date/time to the applicant and then mark this case number as
assigned.
I can look up the case number in a query using first in the total row,
but cannot figure out how to generate the code to do the updates and
call everything with a command button.
I did something similar using DMAX for a batch number, but didn't have
to save any info, this scenario needs to use the preassgned numbers.
Any help would be greatly appreciated.
Liz- Hide quoted text -

- Show quoted text -

Thanks Larry, this is a multiple concurrent users application. The
case numbers have to run between 1001 and 1370 for the first date with
30 numbers used every 15 minutes, when 1370 is assigned the case
number has to change to 2001 and run up to 2450, then change to 3001
and run up to 3370. The preassigned numbers correspond to the date and
time the applicant comes to received their Christmas assistance.

Oct 9 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: James Turner | last post by:
I am trying to store formatted text (windows format) into a MySQL database and then retrieve it. The field in the database is a varchar. I cut and paste the test into a form field formatted, then...
4
by: Kevin | last post by:
I am having problems in my php code. I am relatively new to php but I know some basics. This is the problem: when i try to echo some information that is typed into form back to the screen i...
2
by: Edward C. Jones | last post by:
Here is a stripped-down version of a Python Cookbook recipe. Is there a simpler, more Pythonical, natural way of doing this? ------ #! /usr/bin/env python # Modified from Python Cookbook...
7
by: Alan Illeman | last post by:
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: <BODY> <PRE STYLE="font-family:monospace; font-size:0.95em; width:40%; border:red 2px...
2
by: Buck Turgidson | last post by:
I want to have a css with 2 PRE styles, one bold with large font, and another non-bold and smaller font. I am new to CSS (and not exactly an expert in HTML, for that matter). Is there a way to...
3
by: Michael Shell | last post by:
Greetings, Consider the XHTML document attached at the end of this post. When viewed under Firefox 1.0.5 on Linux, highlighting and pasting (into a text editor) the <pre> tag listing will...
3
by: Patrick Fogarty | last post by:
I am programming what is to be a web service client that will use an HTTP-POST to request and retrieve data. The remote server (written in java for what it's worth) requires basic authentication...
52
by: mavic | last post by:
hi to everybody,i need help for my project....how to make a program that accept any integer and convert it binary,octal and hexadecimal.pls help me...thanks
2
by: André | last post by:
I've started using elementtree and don't understand how to use it to manipulate and replace nodes. I know how to do this using a simple, but inefficient parser I wrote, but I'd rather learn to use...
11
by: swethak | last post by:
Hi, My Requirement is to upload the images into database through jsp. For that i write a code .And it works fine .But in that File imgfile = new File("C:/Program Files/Apache Software...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.