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

Create a lookup statement based on selected criteria

I am creating a database that creates travel requests. In my main table, I have two tables
[TAR] that contains
[Going to] (looks up using [Per Diem Rates])
[Lodging] Yes/No
[Lodging Rate]
[Per Diem Rates] contains
[State]
[Destination]
[Lodging Rate]

When a person selects yes on the [Lodging] button and selects a a destination by using [Destination] on the [Per Diem Rates] table, I want the Lodging rate to populate with the rate that is listed with the selected destination.

Any help would be appreciated
Aug 7 '14 #1
2 958
twinnyfo
3,653 Expert Mod 2GB
You would have two combo boxes on your form, one for the state, one for the destination (which begins disabled). When you select a state, requery the row source of the destination combo box based on the state results (include destination and per diem rate in the row source) and enable it. When the user selects a destination, update the TAR.[Per Diem Rate] with the value of the destination combo box.
Aug 7 '14 #2
zmbd
5,501 Expert Mod 4TB
Please take a look at our insights article covering cascading comboboxes. While it doesn't directly apply to your question, it will provide some more depth to TwinnyFo's answer:
[*Main list*]Microsoft Access / VBA Insights Sitemap

[*The article*]Cascaded Form Filtering
As mentioned, it's how to setup the comboboxes that applies directly to your quesition....

Don't worry if you don't follow all of the code... we'll help with the rough spots. (^_^)

My other concern here is the normalization of your database... >> Database Normalization and Table Structures.
Aug 7 '14 #3

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

Similar topics

0
by: Chris Powell | last post by:
I am using Excel/Access 2000 and have two large Excel files (25,000 rows each) that I wish to create linked tables in Access rather than importing into Access. The two source Excel files change...
2
by: Alicia | last post by:
Does anyone know why I am getting a "Syntax error in Create Table statement". I am using Microsoft Access SQL View to enter it. Any other problems I may run into? CREATE TABLE weeks (...
0
by: neoteny2 | last post by:
I need MS Access to automatically create reports/subreports based on specific criteria. I am building a database in Access 2003 with different locations/sites. I have the "sites" table created...
1
by: fleece | last post by:
I have a continuous form based on some selected criteria. Now I want to send the search results to a report. How could I do that? It's better if I could sort the results before export to report. ...
0
by: josur | last post by:
Hi, I would like to know if is possible to create dynamic reports based on cubes. What i mean is,after creating a cube with a couple of dimensions and measure if is there any way to give the...
4
by: nanabuch | last post by:
Hello, I am new to this forum, and I am a newbit in Oracle, I do have a background in MS Access, VBA, SQL server development and some Oracle backend development work. I have been giving a task...
0
by: Looch | last post by:
All, I'm using the GridView wizard to generate an Update statement based on the select statement that fills the GridView. I have since created a stored procedure that I'd rather use and when I...
10
by: JohnO | last post by:
Hi All, This question is related to iSeries V5R4 and db2. I want to implement an AFTER DELETE trigger to save the deleted rows to an archive table, I initially defined it as a FOR EACH...
11
by: woodey2002 | last post by:
This problem is driving me crazy. Hello there, i am trying to create a search form for records in my access database. The search form will contain text boxes and a multi select list box. The user...
1
by: gonzo1979 | last post by:
I am building a database that requires a unique number assigned to it based on criteria. Example: One field is a drop down that says AIR/GND/OD, another is a YES/NO titled Recordable. If a person...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.