473,651 Members | 2,750 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Default Value from a Lookup Table

I want to set a default value in a table called "Quotes" for a field
called "Source."

The "Source" field uses a lookup table called "Source" which looks
like this:

Sourceabbrev Sourcename
BX-MI BUILDERS EXCHANGE MI
BX-OH BUILDERS EXCHANGE OH
CNS-MI CONSTRUCTION NEWS SERVICE MI
DODGE-MI DODGE MI
OTHER OTHER
I want the default to be "OTHER". What do I need to enter in the
"Quotes" "Source" default value line to get this to happen?

I need the exact syntax since I've tried several things and keep
getting syntax or other errors.

Thanks,
Tina

Jun 13 '07 #1
4 6637
Hi

Unless I've misunderstood you should just be able to enter "OTHERS" as
the default value

Thanks
James

http://www.jamesoleary.co.uk/

On 13 Jun, 15:52, TinaF <tferr...@uisco rp.comwrote:
I want to set a default value in a table called "Quotes" for a field
called "Source."

The "Source" field uses a lookup table called "Source" which looks
like this:

Sourceabbrev Sourcename
BX-MI BUILDERS EXCHANGE MI
BX-OH BUILDERS EXCHANGE OH
CNS-MI CONSTRUCTION NEWS SERVICE MI
DODGE-MI DODGE MI
OTHER OTHER

I want the default to be "OTHER". What do I need to enter in the
"Quotes" "Source" default value line to get this to happen?

I need the exact syntax since I've tried several things and keep
getting syntax or other errors.

Thanks,
Tina

Jun 13 '07 #2
On Jun 13, 9:57 am, James <james_no_spam_ ple...@yahoo.co .ukwrote:
Hi

Unless I've misunderstood you should just be able to enter "OTHERS" as
the default value

Thanks
James

http://www.jamesoleary.co.uk/

On 13 Jun, 15:52, TinaF <tferr...@uisco rp.comwrote:
I want to set a default value in a table called "Quotes" for a field
called "Source."
The "Source" field uses a lookup table called "Source" which looks
like this:
Sourceabbrev Sourcename
BX-MI BUILDERS EXCHANGE MI
BX-OH BUILDERS EXCHANGE OH
CNS-MI CONSTRUCTION NEWS SERVICE MI
DODGE-MI DODGE MI
OTHER OTHER
I want the default to be "OTHER". What do I need to enter in the
"Quotes" "Source" default value line to get this to happen?
I need the exact syntax since I've tried several things and keep
getting syntax or other errors.
Thanks,
Tina
I can't do that because the data type is set to Number. So I'm
assuming it uses the row number. I did not set up this database,
someone else did before I worked here.

Jun 13 '07 #3
TinaF wrote:
On Jun 13, 9:57 am, James <james_no_spam_ ple...@yahoo.co .ukwrote:
>>Hi

Unless I've misunderstood you should just be able to enter "OTHERS" as
the default value

Thanks
James

http://www.jamesoleary.co.uk/

On 13 Jun, 15:52, TinaF <tferr...@uisco rp.comwrote:

>>>I want to set a default value in a table called "Quotes" for a field
called "Source."
>>>The "Source" field uses a lookup table called "Source" which looks
like this:
>>>Sourceabbr ev Sourcename
BX-MI BUILDERS EXCHANGE MI
BX-OH BUILDERS EXCHANGE OH
CNS-MI CONSTRUCTION NEWS SERVICE MI
DODGE-MI DODGE MI
OTHER OTHER
>>>I want the default to be "OTHER". What do I need to enter in the
"Quotes" "Source" default value line to get this to happen?
>>>I need the exact syntax since I've tried several things and keep
getting syntax or other errors.
>>>Thanks,
Tina


I can't do that because the data type is set to Number. So I'm
assuming it uses the row number. I did not set up this database,
someone else did before I worked here.
Are you saying that the Source field in table Quotes is numeric? And
the SourceTable has no numeric or autonumber fields in it? That seems odd.

Well, if it's using numbers then, look for a quote record with the
Source = Other. I suppose that would be a 4 based on the record list of
the source table you provide. Try 1,2, or 3 if that doesn't work.

I suppose if that's the way it's done you can find some code that
converts the numbers to text and visa versa. Seems like a bunch of work
when one could have used a lookup table. Or perhaps it is using a combo
box to select and the rowsource type (open property sheet of combo,
click Data tab) is ValueList instead of Table/Query. If so, determine
the number associated to the value list.

Jun 13 '07 #4
On Jun 13, 10:57 am, James <james_no_spam_ ple...@yahoo.co .ukwrote:
Hi

Unless I've misunderstood you should just be able to enter "OTHERS" as
the default value

Thanks
James

http://www.jamesoleary.co.uk/

On 13 Jun, 15:52, TinaF <tferr...@uisco rp.comwrote:
I want to set a default value in a table called "Quotes" for a field
called "Source."
The "Source" field uses a lookup table called "Source" which looks
like this:
Sourceabbrev Sourcename
BX-MI BUILDERS EXCHANGE MI
BX-OH BUILDERS EXCHANGE OH
CNS-MI CONSTRUCTION NEWS SERVICE MI
DODGE-MI DODGE MI
OTHER OTHER
I want the default to be "OTHER". What do I need to enter in the
"Quotes" "Source" default value line to get this to happen?
I need the exact syntax since I've tried several things and keep
getting syntax or other errors.
Thanks,
Tina- Hide quoted text -

- Show quoted text -
You need to set an autonumber (random) primary key in the Source table
and call it SourceID. Then in the Quote table (table names should be
singular ergo Quote would be the name to use for this table not
Quotes) set the default value of the Status field to the value of the
SourceID for the "Other" source in the Source table. You should
actually change the field name in the Quote table to SourceID since
that is what it stores and not the actual Source name. Welcome to
the world of relational databases. While you are at it set yoru
relationships!
Jun 13 '07 #5

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

Similar topics

1
3566
by: Sophie Bradshaw | last post by:
i was wondering if anyone could possibly help me! i have a ms access database, and in one of the tables, one of the fields is a lookup column, with several possible values. what i want to do is when i create a record and choose a value for the lookup, i want the next record to default to the value in the previous record in the lookup field. e.g. if record 1 has 'example' as the value for the lookup field, record 2, when tabbed into it...
2
10051
by: Todd D. Levy | last post by:
I have a table of Country names & Country codes in alphabetical order. This is a lookup table that a number of other tables use to populate the Country field via a drop down Combo Box on the form(s) for the table(s) in question. The "United States" Country name & the "US" Country code are selected 99% of the time. I would like to have the "United States" & "US" be the default values
3
2912
by: my-wings | last post by:
I've been reading about how evil Lookup fields in tables are, but I've got to be missing something really basic. I know this subject has been covered before, because I've just spent an hour or two reading about it on google, but there is something I still don't understand, and I'm hoping someone will be willing to explain it to me in small words. Let's say I have a table for addresses, and it includes a field for state. What I would...
1
2132
by: Dan | last post by:
I am using an expression in Forms to take several fields of data and convert them to a block of text. For one of the fields set-up as a combo box, it is based on a Lookup of a separate table to text in a specified field. The table of data that is looked up has 3 fields: Index , Eng , Fr . When I concatenate the fields into the expression, the field for looking up the month displays as the numeric value of the lookup table, not the...
1
1704
by: jhicsupt via AccessMonster.com | last post by:
Bear with me – a long question but hopefully someone can help me. I have a survey which uses weighting to get the final score. I’m trying to find the best way to calculate the final score. I have two tables A table with all the employee information which includes the , , and . A table that will be used as a lookup to determine the weighting of that
0
1984
by: northshore | last post by:
Hello, I am creating a windows application database. I have a primary table 'Individuals' and a lookup table 'Prefixes.' In the Individuals table, I have a column 'PrefixID' that references values of prefixes from the Prefix table based on the PrefixID in the Prefix table. When I load a windows application form, I can display and update data from the primary table. This includes the prefixID value. If I display a combo box with...
5
4008
by: sensreview | last post by:
Hello, I need help in selecting a value from combo list thru one lookup table and update different table on MS access form. For eg; I have a lookup table of usernames, I need to use this lookup table in all my other forms to update different table selecting the username from my lookup table. I tried Docmd.runsql but unable to succeed.
1
1341
by: whitbacon | last post by:
I would like to have the ability to archive values in a lookup table. Take the following example lookup table luid, label, archive 1, green, No 2, red, No 3, blue, No select * from lookup table where archive = false
6
5177
by: David Wright | last post by:
Hello Folks I am using Microsoft Access 2000 I would be grateful if someone could help me with “Dlookup”. I tried various methods of writing Dlookup and various events to trigger it, none of which were successful. I have been able to display the required value in a ‘text box’ which is a little helpful but not ideal. I have a table called tblLogSheet. The ‘Description’ field of this table uses a lookup table called...
0
8802
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
8697
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...
1
8465
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8579
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7297
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...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
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
4144
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1587
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.