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

Use results of a query to open corresponding records on the main form?

Hi,

I have put together a reference library of journal articles and other citations. There are various queries that prompt the user to enter a search term (such as a keyword) and return all article citations that contain the keyword that the user entered.

We want to add a feature where the user could click on any part of the citation info returned from the query, and be taken to that same citation's record in the main form (frmCite).

I played around with this by having the results of the query displayed in a form, and creating a command button with an OnClick event. However, I haven't been able to come up with any VBA code that tells Access to open frmCite, go the record with the same CiteID (PK of tblCite) as the CiteID of the record in the query, and to do this for each record that is returned as a hit from the query.

FYI, here is the SQL statement that the query is based on:
SELECT tblCite.CiteID, tblCite.Title, tblCite.Journal, tblCite.VolumeNum, tblCite.IssueNum, tblCite.CopyrightYear, tblCite.BookTitle, tblCite.PublisherName, tblCite.Abstract
FROM tblCite
WHERE (((tblCite.Abstract) Like "*" & [Enter search term] & "*"));

Does anyone have any suggestions? I know very little about VBA so the more actual code someone could help me with, the better!

Thanks in advance.
Nov 16 '07 #1
1 1145
Bump.

Please help me out, if you can. :(
Nov 18 '07 #2

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

Similar topics

2
by: Pete | last post by:
Before I get started with the question, does anyone have a (single) good book recommendation for database design? Not an Access-specific book, but something geared toward helping me figure out...
3
by: William Wisnieski | last post by:
Hello Everyone, Access 2000, I have a main unbound form with a bound datasheet subform . The subform is bound to a query that returns records based on criteria in the main form. The user...
2
by: Simon Pleasants | last post by:
Am something of a newbie at this, so please bear with any stupid questions. I have created a database to track shipments that we import. The information is stored in a table and I have created...
5
by: Lyn | last post by:
This one is difficult to explain, so I will cut it down to the basics. I have a major table 'tblA' which has an autonum field 'ID-A' as primary key (of no significance to users). 'tblA' contains...
5
by: Marcus | last post by:
I have the following code: Private Sub cmdDatasheet_Click() DoCmd.OpenQuery "qryCourse_Details" End Sub I would like to check to make sure that this above query has zero rows, then show a...
6
by: Brian | last post by:
Hello, Basically, I'm running a query on a form's activation, and I'd like to have the results of the query be placed into other fields on the same form automatically. Does anybody know how...
2
by: kev | last post by:
Hi Folks, I have created a search query in which it successfully returns correct results. When there are no records returned, instead of giving out a blank form i created a pop-up msg which is...
9
by: Kelii | last post by:
I've been trying to get this piece to work for a few hours, but have given up. I hope someone out there can help, I think the issue is relatively straightforward, but being a novice, I'm stumped....
16
by: dougmeece | last post by:
Good day everyone, I have a database with 2 main forms. The first form is used to add records to the database and contains a command button that opens the 2nd form for records searching. On...
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: 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?
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.