473,386 Members | 1,715 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.

VBA code for field/record selection

7
I have 2 tables.

table 1 looks like:
Test1 Test2 Test3
0.6 0.1 0.5
0.4 0.4 0.3
0.2 0.8 0.5

table 2 looks like:
Test LowLimit HighLimit
Test1 0.3 0.5
Test2 0.3 0.6
Test3 0.2 0.6

I want to generate a table like following (if tbl1 record value is between high/low limit of tbl2, it's good, otherwise bad)
Test1 Test2 Test3
Bad Bad Good
Good Good Good
Bad Bad Good

how can i achieve this?

thanks a billion....
Oct 23 '08 #1
5 2221
Hi

First Quick solution:

Your 'database' looks like spreadsheet approach so just export to excel and then it should be very easy to do and import to db.

Second option would be to redesign the tables to become a proper database
check 'normalization' on wikipedia. (The design will depend on the 'big picture' of your database)

Hope it helps a little bit.

Regards
Emil
Oct 23 '08 #2
qwert1
7
Hi Emil,

Thanks for your reply.

What I am trying to do is only one step of a long process, and will be repeated for multiple tables & many times on daily basis. In short, Excel approach will not work for me.

My real problem is that I don’t know how to:
Select a specific field with VB code.
Select a specific record after a field been selected from a table with VB code.
Find AbsolutePosition of a record from a certain field,

I googled internet but did not get any useful info.

Can you point me to the direction that I can learn how to manipulate data records using VB?

Thanks!!
Oct 23 '08 #3
NeoPa
32,556 Expert Mod 16PB
Basic DAO recordset loop using two recordsets may help you there, but I would first look at Normalisation and Table structures.

Your Table1 needs to be Transposed. The fields should be records. It can probably be done using VBA but really, as there is no identifier in your records in Table1, it is undefined, and therefore useless, information.
Oct 24 '08 #4
qwert1
7
NeoPa,

Thanks for your help.

In order to focus on the issue, I just made up a small tbl of data that represents my problem. The real db tbl contains more info as exampled here and are better structured.

Thanks again...
Oct 24 '08 #5
NeoPa
32,556 Expert Mod 16PB
I would think the layout you showed must be at least representative though (surely?). If so, then you still have the same problem and need to look at it. If not, then we probably need something that reflects the actual situation.

BTW I applaud the concept of knocking together a test-bed. Just be careful that it's a close enough representation so you're not getting irrelevant results.
Oct 24 '08 #6

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

Similar topics

3
by: Alan Pocklington | last post by:
Hi, I've created a Java Applet that allows the user to select a record. As the user makes the selection, the applet uses LiveConnect (JSObject) to write the record id to a html field (the name...
5
by: Bayla Frankl | last post by:
Hi all, I am a little stumped. I have a query I am trying to run to retrieve the last Progress Note record from the database for the current patient so that the therapists can see the last note...
3
by: Wim Verhavert | last post by:
Hi all, I'm bothered with this question for weeks now.... Is it possible to edit multiple records at once using VBA? I have this continuous form and depending on the selection the user makes, I...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
9
by: Bob Alston | last post by:
In 2002, "GrayJay" posted the following code: I did this in a jazz record catalogue to find composers - On a form "frmComposers" Create a text box - txtFindComposer, and add the following sub...
2
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to...
12
by: dbuchanan | last post by:
I am designing a table to contain a field to stores a value that must indicate none, one, or many choices. The form will have a group box with checkboxes (multi-choice) You see the records in...
1
by: mr k | last post by:
Hi, I wanted to use mail merge with forms but Text form fields are not retained during mail merge in Word, I got the code from Microsoft but it doesn't remember the text form field options such as...
2
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
4
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
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: 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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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
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...

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.