473,500 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting a form field to change based on criteria in another

2 New Member
I am working with an Access Form and I would like to have a field that chooses it's criteria based on an option that is chosen. I am not writing this in code so I will need to be guided on how to do this without (or how to do it with, if it is pretty simple).

Basically, I am trying to assign a particular accounting code to an order based on what department the order is entered for. I would like to use consecutive auto numbers to generate the accounting codes. I have three departments and their accounting codes are 7#####, 9##### and J#####. I was thinking that I could set up three tables to generate these codes separately and then use an option group in my form that would tell the form which table to get the code from when the Order is entered. I don't know if I need a separate table to tie my Order Number with the Accounting Code and how I get the form to choose which table to get the code from.

I may be trying to do the impossible on too little knowledge but I would really like to make this easy for my users. Can anybody offer me some help or advice on this?

Thanks,

boyd
Sep 25 '07 #1
1 1379
nico5038
3,080 Recognized Expert Specialist
I am working with an Access Form and I would like to have a field that chooses it's criteria based on an option that is chosen. I am not writing this in code so I will need to be guided on how to do this without (or how to do it with, if it is pretty simple).

Basically, I am trying to assign a particular accounting code to an order based on what department the order is entered for. I would like to use consecutive auto numbers to generate the accounting codes. I have three departments and their accounting codes are 7#####, 9##### and J#####. I was thinking that I could set up three tables to generate these codes separately and then use an option group in my form that would tell the form which table to get the code from when the Order is entered. I don't know if I need a separate table to tie my Order Number with the Accounting Code and how I get the form to choose which table to get the code from.

I may be trying to do the impossible on too little knowledge but I would really like to make this easy for my users. Can anybody offer me some help or advice on this?

Thanks,

boyd
Hmm, you're trying to create tables, just for the sake of different departments. In general we just make sure that the departmentcode is a field in the ordertable.
To het the Accounting Code we have a different tblDepartment holding the Departmentcode and the Accounting Code. Thus we only have to change an Accounting Code once when it's changed for a department :-)

When the orders need to be numbered per department you can use a DCOUNT() function, but in general wh just use a "dummy" autonumber and use that for teh unique reference. When you have a limited number of orders, you could use the date/time as the order identifier, but when you want to number them per department you could use for new records a default fieldvalue like:
Expand|Select|Wrap|Line Numbers
  1. =NZ(DMax("OrderNumber","tblOrder")) + 1
  2.  
Getting the idea ?

Nic;o)
Oct 5 '07 #2

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

Similar topics

303
17412
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
2
5951
by: Iain Miller | last post by:
Now this shouldn't be hard but I've been struggling on the best way as to how to do this one for a day or 3 so I thought I'd ask the assembled company..... I'm writing an application that tracks...
4
6256
by: James | last post by:
Dear group, Can anyone tell me how to do the following? I have a basic list of numbers in a table I want to be able to search these by letting the user type "<10" or ">=50" on a simple form...
4
6965
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
3
1968
by: dskillingstad | last post by:
I'd appreciate any help I can get. I'm not sure what I'm doing wrong, but.... I've searched these groups for some solutions but no luck. I have an unbound form (frmSearch), with several unbound...
2
946
by: fstenoughsnoopy | last post by:
I have a customer order database and I need to pull a customers information, ie first name, last name, address, city, state, zip, phone, etc, into the oder table. i don't know how to go about...
5
2032
by: SeanCly10 | last post by:
Hi all. I don't want to sound like a complete idiot here, but I'm somewhat limited in my coding knowledge, and I need some advice and help. I'm working on a database that will eventually be used...
2
4432
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
2
2276
by: MNNovice | last post by:
I am working on a database on my CD collection using Access 2003. Some of the table structures are given below. Table 1 tblMusicCategory Field 1: MusicCategoryID - Auto Number (PK) Field 2:...
0
7136
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7182
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,...
1
6906
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
7397
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
5490
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,...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
316
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...

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.