473,386 Members | 1,819 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,386 software developers and data experts.

Basing combo box on field in TABLE in Access 2007

I understand the code

Expand|Select|Wrap|Line Numbers
  1. SELECT Brand.[Brand Name], Company.[Company Name]
  2. FROM Company INNER JOIN Brand ON Company.[Company Name] = Brand.[Company Name]
  3. WHERE (((Company.[Company Name])=[forms]![project]![company name]))
  4. ORDER BY Brand.[Brand Name];
As it will only show the brand names from a particular company previously selected in the form. However, this code works in a form but not in a table. What is the equivalent code for a table?

Thank you very much for your help
Jan 17 '13 #1

✓ answered by TheSmileyCoder

Tables are for storing information, and forms are for presenting and modifying information.

That said, its possible to do something similar, its called a Lookup field(google it). However I strongly recommend against them, and so do other Access developers, see The Evils of Lookup Fields in Tables

5 1167
TheSmileyCoder
2,322 Expert Mod 2GB
Tables are for storing information, and forms are for presenting and modifying information.

That said, its possible to do something similar, its called a Lookup field(google it). However I strongly recommend against them, and so do other Access developers, see The Evils of Lookup Fields in Tables
Jan 17 '13 #2
I've been looking around a bit and still having some trouble. Do you know if it's possible to use a lookup field to get data from a different field in the same table in table form (as opposed to getting data from a field in a DIFFERENT table)? Regardless of the consequences.

Thank you for replying!
Jan 17 '13 #3
TheSmileyCoder
2,322 Expert Mod 2GB
I am unsure what you mean by table form? Is that a table or a form?

If you are using a form, I suggest you take a look at:
http://bytes.com/topic/access/insigh...mbo-list-boxes
Jan 17 '13 #4
NeoPa
32,556 Expert Mod 16PB
I believe that should be possible. If you have tried and failed then let us know, in detail, what you've tried and what resulted, and we'll do what we can to help you regardless of our own opinion on the advisability of the approach.

NB. ** Warning **
I'm sure you already appreciate that this is very much something most people warn against, or at least if you don't, then you have elected not to follow the warnings given anyway, but others may not appreciate the position. It is for them that I add this warning that using ComboBox features within a table design can lead to all sorts of troubles and issues. I've taken on projects before where these have been used, and working on them is so frustrating as they often break after changes are made to the related tables, and working with them becomes a real slog.
Jan 17 '13 #5
TheSmileyCoder
2,322 Expert Mod 2GB
Weeks of work can quickly save you hours of planning
I have always loved that quote.
Jan 17 '13 #6

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

Similar topics

1
by: blademike | last post by:
Hi guys, I'm new to Access & SQL. Currently using Access 2007. What I have: 1) Table: Employee( empID, empName, email, pwd, ... ) 2) Form: - Record source ( SELECT empName, email, pwd FROM...
1
by: jackbenimble999 | last post by:
Hello! What is the best way to display a EUC-encoded field with Access 2007? Or, failing that, how do you display a Unicode field as the character instead of the number? Do I need to use a...
0
by: Bernadette Vandaele | last post by:
Hi, I am changing the background color of a combo box in a continuous form in Access 2007 with vba (... .backcolor = ...) from grey to white, but it doesn't work for all the lines in the...
2
by: anniebai | last post by:
My application has a master form as Student, and several child subforms (projects, courses, attendances) attached to a certain student. The master and child are connected by "StudentID". Taking...
6
by: mulamootil | last post by:
Hey guys - Is there a way to wrap the text in the header field in an Access 2007 table. I did some googling, however no luck, thought I will post it here. I sure appreciate your time and help. stan
2
by: rywags11 | last post by:
Hello, Can anyone help me figure out how to show/hide fields based on information entered in other fields in a form in Access 2007? What I'm looking to do is: When a selection from a drop down is...
3
by: prashantdixit | last post by:
Hi, I have a form named as "Add New Stock" and it has some controls. There is control name as "Reference" along with "Browse folder" button. So user can select a file through this Browse button...
0
by: vba challenge | last post by:
I have a Salary table(The one side) and a Deductions table(The Many side). Whenever the salary is entered I want to calculate and store the deductions in the deductions table. I know...
2
by: MOCaseA | last post by:
OK I have a problem. I'm fairly sure this has been answered somewhere, but ai can't seem to find it. I have a single table with 3 fields: Table1: empFirstName empLastName empFullName In a...
2
by: jond | last post by:
Database Details: I have 2 tables; "tblContracts" and "tblVendorInfo" and a form ("frmVendorInfo) created off of the table "tblVendorInfo". I have fields including: "PO Number" (Primary Key),...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
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...
0
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,...
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...

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.