473,830 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2093
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**********@c omcast.netwrote in message
news:11******** **************@ r29g2000hsg.goo glegroups.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...@localh ost.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_...@c omcast.netwrote in message

news:11******** **************@ r29g2000hsg.goo glegroups.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********@gma il.comwrote in message
news:11******** *************@o 80g2000hse.goog legroups.com...
On Oct 8, 4:16 pm, "Larry Linson" <boun...@localh ost.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.netwrot e in message

news:11******* *************** @r29g2000hsg.go oglegroups.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
17751
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 call the PHP program to add the record using POST. When I get the text out, it has lost it's formatting. Formatting in the text is achieved by multiple spaces not tabs, but even multiple spaces are converted to a single space and the carrage...
4
3498
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 get absolutely nothing. It seems like $_POST is an empty string, along with $_POST and $_GET. I looked around to see if someone else had the same problem and found
2
1446
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 entry 91192, "eiffelmethod" by Andres # Tuells. The url is # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/91192
7
18543
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 solid; color:red;
2
2797
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 do this in CSS? <STYLE TYPE="text/css"> pre{ font-size:xx-large;
3
12939
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 preserve formatting (white space and line feeds). However, this is not true when doing the same with the <code> tag listing (it will all be pasted on one line with multiple successive spaces treated as a single space) despite the fact that...
3
6938
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 as per RFC 2617 (http://www.faqs.org/rfcs/rfc2617.html). My attempts to authenticate are failing. The server requires the header to be present with the request. For security reasons, it will not reply in any way if the header is not present. ...
52
4145
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
7093
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 a better tool - especially as it is to be added to the standard library. I'll use a simple, but representative example. Suppose I have the following text, where I inserted blank lines to isolate the part I want to manipulate....
11
16181
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 Foundation/Tomcat 5.5/webapps/test/Blue.jpg"); instead of that i used File imgfile = new File("Blue.jpg"); like that it didn't work. When we browse that image from local system it automatically takes like Blue.jpg and didn't take the full path. So i got...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10774
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10489
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9314
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6950
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.