Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 13th, 2006, 10:53 PM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default VBA help pls

Hi

I am trying to link lists within Access using VBA within the same table, but don't seem to be able to get it to work.

Here is the table format.


col1 col2 col3 Tag Title
A W Fishing
A 1 X Freshwater
A 11 Y Pondage
A 12 Y Streams
A 2 X Saltwater
A 21 Y Bank fishing
A 22 Y Boat fishing
B W Farming
B 3 X Cattle farming
B 31 Y Range farming
B 32 Y Feedlot farming
B 4 X Crop farming
B 41 Y Market garden farming
B 42 Y Broad acre

Col1 can have many categories, say, A through Z. I use a query to select and list by tag all of the titles and the corresponding value in col1, col2 or col3. To start the process we choose a title, say, fishing. The title fishing is written to a field "title" in the table. Now, this is where I get lost. I then want to write the "col1" value (A ... Z) for that title in another field in the same table, say "col1 value". I then want to be able to list only those col2 titles that have the same col1 value (A...Z). In this case Freshwater and Saltwater. From this list I then select a title (say, Freshwater) and write the corresponding value (1)in "col2 value". Only those col3 titles that meet the col2 value criteria are listed. In this case Pondage and Streams. A col3 title is selected (Pondage) and the corresponding col3 value (11) is written in the "col3 value" field.

I think this should be quite simple, but can't figure it out. I have done it using the structure of the table, but I need to be able to do it using tags as they will be the best means of control over data selection by query.

Any help will be appreciate.

Thanx.

Adrian
 
Old August 14th, 2006, 12:46 PM
pjm pjm is offline
Authorized User
 
Join Date: Jul 2006
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your description of the problem is confusing. If there are fields in your sample table that are
not relevant to the solution (like Tag appears to be) then leave them out. A sample of the table
you would expect as output would be much more useful than a description of what should happen.

I suspect that a few relatively simple queries (or perhaps just 1) would solve you problem.
Without a clearer idea of what you want, I can't take it any further.


-Phil-





Similar Threads
Thread Thread Starter Forum Replies Last Post
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
Excel vba query not working, pls help me. kavisundar SQL Language 0 May 16th, 2007 10:14 AM
pls auwalsaleh Crystal Reports 0 February 20th, 2006 10:18 AM
Excel VBA to SQL & back to VBA edesousa Excel VBA 1 June 1st, 2004 02:39 AM
Using Mapi to send emails in VBA - Help pls Magic_Hat Access VBA 0 April 21st, 2004 07:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.