472,779 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

Lookup Field in a Table set to required

I have set up a table with a few fields that are set to
required....all work fine except the fields that are Lookup from
another table.

What am I forgetting to set?

Thanks!!
Mar 20 '08 #1
7 2511
On Wed, 19 Mar 2008 22:17:48 -0700 (PDT), samdev
<la***@noblesoftwaresolutions.comwrote:

What you are forgetting is to tell us more about what is not working.

Presumably you are speaking about a form, and for the lookup fields
you have a dropdown that lists the values from the lookup table. So
far that is pretty standard. How does your implementation differ from
that?
You do have 2-column dropdowns, right? A hidden ID value and a visible
Description value. Several examples of this in the Northwind sample
application.

-Tom.
>I have set up a table with a few fields that are set to
required....all work fine except the fields that are Lookup from
another table.

What am I forgetting to set?

Thanks!!
Mar 20 '08 #2
On Mar 20, 1:26*am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Wed, 19 Mar 2008 22:17:48 -0700 (PDT), samdev

<la...@noblesoftwaresolutions.comwrote:

What you are forgetting is to tell us more about what is not working.

Presumably you are speaking about a form, and for the lookup fields
you have a dropdown that lists the values from the lookup table. So
far that is pretty standard. How does your implementation differ from
that?
You do have 2-column dropdowns, right? A hidden ID value and a visible
Description value. Several examples of this in the Northwind sample
application.

-Tom.
I have set up a table with a few fields that are set to
required....all work fine except the fields that are Lookup from
another table.
What am I forgetting to set?
Thanks!!- Hide quoted text -

- Show quoted text -
Sorry....

I have set the field to required at the Table level and yes it is drop-
down as you described and it allows me to input a complete record even
if I have left the lookup field blank. Other fields that I have set to
required, if I leave blank, Access will not allow me to complete/save
the record. I need all required fields to work properly - so not allow
a user to save the record unless all required fields are complete.

Thx,
Mar 20 '08 #3
On Wed, 19 Mar 2008 22:29:40 -0700 (PDT), samdev
<la***@noblesoftwaresolutions.comwrote:

I don't think it quite works that way. You may need to double-check.
If a field does not allow nulls, it doesn't. It MAY accept an empty
string, but not null. Whether it is a lookup field or not has no
bearing on this.
Do you have a default value on this field?

-Tom.

>On Mar 20, 1:26*am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
>On Wed, 19 Mar 2008 22:17:48 -0700 (PDT), samdev

<la...@noblesoftwaresolutions.comwrote:

What you are forgetting is to tell us more about what is not working.

Presumably you are speaking about a form, and for the lookup fields
you have a dropdown that lists the values from the lookup table. So
far that is pretty standard. How does your implementation differ from
that?
You do have 2-column dropdowns, right? A hidden ID value and a visible
Description value. Several examples of this in the Northwind sample
application.

-Tom.
>I have set up a table with a few fields that are set to
required....all work fine except the fields that are Lookup from
another table.
>What am I forgetting to set?
>Thanks!!- Hide quoted text -

- Show quoted text -

Sorry....

I have set the field to required at the Table level and yes it is drop-
down as you described and it allows me to input a complete record even
if I have left the lookup field blank. Other fields that I have set to
required, if I leave blank, Access will not allow me to complete/save
the record. I need all required fields to work properly - so not allow
a user to save the record unless all required fields are complete.

Thx,
Mar 20 '08 #4

"samdev" <la***@noblesoftwaresolutions.comwrote in message
news:44**********************************@13g2000h sb.googlegroups.com...
>I have set up a table with a few fields that are set to
required....all work fine except the fields that are Lookup from
another table.

What am I forgetting to set?
If you truly mean they are defined as LookupFields in the Table, back slowly
away, making signs to ward off evil.

Replace the LookupFields with a Foreign Key to the Table where key and value
for the Lookup is stored. Now, if you insist on playing novice user and
looking at the datasheet view, you'll see the foreign key value, not the
descriptive information (but you'll be seeing exactly what is stored) and
you'll know you can create a query joining the two tables to see the full
information.

What you won't get are the "varagies and eccentricities" of Lookup Fields
which store one value and display another... for anyone who's not doing a
novice-level database and needs to flatten their files in the tables, Lookup
Fields end up being more trouble than they are worth, and should be replaced
with Lookup Tables, as I described above..

Larry Linson
Microsoft Office Access MVP
Mar 20 '08 #5
Be sure to heed Larry's advice. It will save you headaches and
bottles and bottles of asprin.
Mar 20 '08 #6
On Mar 20, 3:58*pm, "Larry Linson" <boun...@localhost.notwrote:
"samdev" <la...@noblesoftwaresolutions.comwrote in message

news:44**********************************@13g2000h sb.googlegroups.com...
I have set up a table with a fewfieldsthat are set to
required....all work fine except thefieldsthat are Lookup from
another table.
What am I forgetting to set?

If you truly mean they are defined as LookupFields in the Table, back slowly
away, making signs to ward off evil.

Replace the LookupFields with a Foreign Key to the Table where key and value
for the Lookup is stored. Now, if you insist on playing novice user and
looking at the datasheet view, you'll see the foreign key value, not the
descriptive information (but you'll be seeing exactly what is stored) and
you'll know you can create a query joining the two tables to see the full
information.

What you won't get are the "varagies and eccentricities" of LookupFields
which store one value and display another... for anyone who's not doing a
novice-level database and needs to flatten their files in the tables, LookupFieldsend up being more trouble than they are worth, and should be replaced
with Lookup Tables, as I described above..

*Larry Linson
*Microsoft Office Access MVP
Thanks - sorry for all the confusion - I am using lookup tables! I'm
still having some issues but most I have worked out.
Mar 20 '08 #7
The question is not the use of lookup tables, but rather using the
lookup tables option in the actual table as opposed to using a lookup
query/table for a dropdown on a form.
Mar 20 '08 #8

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

Similar topics

9
by: Koen | last post by:
Hi all, My application uses a lot of lookup tables. I've splitted the frontend (forms, reports, etc) from the backend (data). The database has around 10 different users. The values in the...
3
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...
1
by: Zachary Turner | last post by:
I want to make a Lookup Field based on another Lookup field. In other words, I have this table A with two fields: ID and Name, where ID is an Autonumber and Name is a friendly name. Then I have a...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
1
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...
1
by: Paul H | last post by:
Say I have a table called tblPeopleInfo, one of the fields in the table is called FavouriteFruit. The FavouriteFruit field is a lookup field and will contain Apples, Oranges, Grapes etc..The list...
3
by: Jimmy | last post by:
I'm not sure the subject line is a very clear description of my problem so... I have two relevant tables for this issue... the lookup table tblLookupItems with three fields . The control...
11
by: Paul H | last post by:
Suppose I have a table called tblPeople and I want a field to illustrate whether each person prefers cats or dogs. I could do it one of three ways. 1. A plain text field Create a text field in...
6
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.