473,626 Members | 3,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with access queries and logic

69 New Member
This question isn't relating to some specific piece of code, but more along the lines of the logic or best method I should use with access 2003 and VBA. I am new to access programming and I am unsure about the best way to get this done. So, let me attempt to explain what I am looking to do.

I am building a database to keep track of quotes given out by a company. Pretty much they want a quote form, that they can bring up and put the quote information into, such as model numbers, options for that model and prices and weights for shipping purposes. I have three tables to work with, models, options, and skid. The models and options are pretty self explanatory, and the skid table is info for calculating the shipping costs. I set up the form using a combo box to bring up the model info, and then another combo box with a SELECT statement to bring up available options for that model. But then later on in the form, I want to use a couple of variables I have saved from the SQL statements in the combo boxs to build another SELECT statement to get the information I need from the skid table. But the problem I am having is that I can't just do a DoCmd.RunSQL with a SELECT statement to get the information I need from the skid table. I guess I could change my SQL statement from the model combo box and also grab any relevant information from the skid table at that time and assign it to a variable for later use, but I don't know if that is the best way to go because it is all information that is used behind the scenes to make a few calculations. It just seems like I am missing something and there is a better way to go about this. Any thoughts, help or ideas would be greatly appreciated.

Thank you
Tim
Oct 8 '07 #1
2 1411
nico5038
3,080 Recognized Expert Specialist
The general approach is to link the tables with needed information and perform the calculation in the query. This way you always have the most accurate values.

Another option is to us the Dlookup() function to extract the needed information in code or as the formula for an unbound field. It's slower as a linked table, but sometimes a good alternative.

Nic;o)
Oct 9 '07 #2
Lumpy
69 New Member
Sweet, thanks for the advice. I will give them each a try and see what works better for me.

Thankyou!
Oct 10 '07 #3

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

Similar topics

7
2122
by: Teri Welch | last post by:
Hello, We maintain a VB6 front-end application using an Access 2000 database. All code and forms are in VB6. The program also uses several queries/reports defined in Access. For corporate reasons we must move to SQL Server right away. Based on our configuration, we're hoping someone can give us a feel for what's involved here. Since we're only using Access for the data we're not sure what an "upsizing" would entail. Can someone point us...
29
3687
by: Mark B | last post by:
We have an Access app (quite big) at www.orbisoft.com/download. We have had requests by potential users to have it converted to an SQL version for them since there corporate policy excludes them from buying mdb backends. Here's the (million dollar?) questions :) How long and how difficult a process would it be? Which SQL platform would we be best to develop it on?
41
3063
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and now!). The application publisher went belly up years ago. Over time we've made a number of VBA code changes (< 500 lines total). Now our CPA is urging us to switch to Quickbooks Premier for Contractors at a cost of $,$$$ plus data entry. Argh, no...
8
1945
by: David Kistner | last post by:
I'm fairly new to Access (I've worked with Oracle and MySQL in the past). I was asked to build an application for a small office and told that I had to use Access 2002. I was VERY uncomfortable with this, but went ahead anyway. So two weeks ago we rolled out the new system and I'm still wondering how robust Access is......I know it's not in the same league as Oracle, but at the same time this isn't a real big application. But I can't...
4
1693
by: BerkshireGuy | last post by:
Our IT department wants to place our Access 2000 tables on an SQL server due to the fact the tables are quite large. With that said, can we still use the Access queries or do we have to do everything via SQL views? I would think we could just create an ODBC connection to the tables on the SQL server and that is the only thing we would need to change. Is my understanding correct? Are there any pros/cons with using the Access queries or...
24
14404
by: cassetti | last post by:
Here's the issue: I have roughly 20 MS excel spreadsheets, each row contains a record. These records were hand entered by people in call centers. The problem is, there can and are duplicate phone numbers, and emails and addresses even person names. I need to sift through all this data (roughly 300,000+ records and use fuzzy logic to break it down, so that i have only unique records.
22
6252
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one client (MS Access vs ..NET Windows Forms) would be preferred over the other. While I have some good arguments on both sides, I would appreciate your points of view on the topic.
6
1263
by: Guy Thornton | last post by:
I have an application in asp.net using vb. The asp.net portion of this application is mainly the user interface. The UI has references made to our business logic layer. And the business logic layer uses a database class to access our data environment. The business logic layer and database class is compiled into a class library. The database class is a single class that contains all of our queries there. It is implemented following...
1
19396
MMcCarthy
by: MMcCarthy | last post by:
Access has a number of built-in functions which can be generally used in queries or VBA code. Some of the more common ones are: Note: anything in square brackets is optional Date Functions Date() - Returns the current system date Now() - Returns the current system timestamp (date and time)
0
8265
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8196
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8637
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...
0
8504
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
5574
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
4092
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...
1
2625
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1808
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1511
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.