Okay, now I need to open a form (frmTopics) and select the same record that has been double-clicked on in a separate form (frmTopicsFound ). Here are the details:
frmTopicsFound contains datasheet subform sfrmTopicsFound . sfrmTopicsFound is populated from a query that returns a list of topics based on a keyword search. I want users to be able to double-click a row in sfrmTopicsFound and have frmTopics open to that same record. frmTopics may or may not not be open already.
So basically, I need some code on the OnDlbClick event for sfrmTopicsFound .nbrTopID that will:
1. Open frmTopics if it's not already open
2. Display the record from tblTopics where tblTopics.topID = Forms!sfrmTopic sFound!nbrTopID
I'm sure this has been done so if anyone could point me to some sample code, maybe I can take it from there. Thanks!
19 7808 NeoPa 32,571
Recognized Expert Moderator MVP
Basically, in the Double-click event procedure you would call the open of the form but with a WhereCondition set to a string which identifies the record selected.
Does that give you enough?
NeoPa 32,571
Recognized Expert Moderator MVP
By the way, I used Me.nbrTopID rather than Forms!sfrmTopic sFound!nbrTopID as, presumably, the code runs within the same form as the control is contained in.
When I double click the field, I am getting a parameter box, where I have to manually enter the topic ID that I double-clicked on in sfrmTopicsFound . So apparently the value in sfrmTopicsFound .nbrTopID is not being read into the parameter. After I manually enter the topic ID, the correct topic appears in frmTopics. Here is my line of code: - DoCmd.OpenForm "frmTopics", , , "nbrTopID=" & Me.nbrTopID
Something similar happened in another situation and the problem turned out to be the relationship between forms and subforms. Could I possibly need to change
to syntax as if I were on the main form referring to the subform or something along those lines?
BTW, nbrTopID is an autogenerated number field.
Or could it have anything to do with the fact that my subform is a datasheet and not a single form with only one record displayed at a time?
NeoPa 32,571
Recognized Expert Moderator MVP
Is the code in the module of the main form or the subform?
The code is in the subform because that is where the double-clicked field is.
NeoPa 32,571
Recognized Expert Moderator MVP
Please try the following code before your DoCmd.OpenForm line and post what you see : - Call MsgBox("nbrTopID=" & Me.nbrTopID)
BTW I was expecting the code SHOULD be in the subform, but people do funny things sometimes ;)
I got a message box saying "nbrTopID = 7" which happens to be the id number of the first record returned by the particular keyword search I used in this instance.
And I am very likely to be one of those people doing funny things! :)
NeoPa 32,571
Recognized Expert Moderator MVP
I think we need to look at the underlying query then.
Let's first try opening the form without any WhereCondition and see what results you see. - DoCmd.OpenForm "frmTopics"
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Hari Om |
last post by:
Here are the details of my error log files:
I execute the command and get following message at console:
----------------------------------------------------------------------
../sqlldr scott/tiger@common control=/full_path/test.ctl
log=/full_path/adhoc/test.log
SQL*Loader: Release 9.2.0.1.0 - Production on Tue Sep 2 10:49:27 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
|
by: Bernard Drolet |
last post by:
Hi, I have a recursive table "Objectnew" with the columns "objectref"
(primary key), objectname, objectid, and parentobjectid
Recursive Relation: objectid ----< Parentobjectid
I have the following cursor that extracts information about all
objects with a specific name below a starting point
DECLARE
CURSOR findChildren(
starting Objectnew.objectref%TYPE,
|
by: Steve |
last post by:
Access97 Database
The database is split into a frontend and backend and not connected to any other
database. The database has an unbound report with 15 subreports. Some of the
subreports include Excel charts in unbound object frames. When I add 3
additional subreports, I get the error message that Access can't open any more
databases. Can anyone suggest what may be causing the error message.
Thanks!
|
by: ferbar |
last post by:
Hi all,
I'm trying to read from the txt file 'ip.packets.2.txt' using the read
function. It seems everything ok, but I get a -1 when executing
>>bytesr = read(fdo1, bufread, 2);
The 'open' function returns the file dsc 3. So this seems ok..
Any idea what might be wrong?
|
by: Thief_ |
last post by:
I need to use an existing IE window which already has a specific url and
re-use that window for a new URL.
Example:
One open IE window has the following in its Address Bar:
http://www.vbcity.com/forums/search.asp?mode=doit
The window title is:
| |
by: Kevin |
last post by:
I have a workflow application that uses email notifications which include a
link for the user to visit a specific approval web page. For example
ApprovalPage.aspx?ID=25
I want to replace the web application with a windows application.
How would I open a windows application from an email and navigate to a
specific record?
Thanks for your help!
|
by: Wayne |
last post by:
The following problem started on my PC about a week ago and I can't
link it to any specific change. I'm using Access XP.
If I have any database open and try to open any other database by
double clicking its file in Explorer, it takes about 5 seconds to open.
Previously the second database would open almost instantaneously, as
one would expect on a reasonably fast machine.
However if I have any database open and then open a second...
|
by: Wayne |
last post by:
Original Post:
The following problem started on my PC about a week ago and I can't
link it to any specific change. I'm using Access XP.
If I have any database open and try to open any other database by
double clicking its file in Explorer, it takes about 5 seconds to open.
Previously the second database would open almost instantaneously, as
one would expect on a reasonably fast machine.
|
by: Cagey |
last post by:
What I'm trying for: If this selection or if click on selection
(highlighted line choice/
which ever selection change) w/in query's combo dropdown list box (on
Switchboard),
then Open in Datasheet View, the specific underlying record's Row...
showing all columns Or selected columns.
For a specific row's record ONLY, Or for all Xs (same type), or for the
whole data sheet
(all records... includes all types then), but focus still opens...
|
by: howkoss |
last post by:
Hi, I've been very frustrated for 2 days trying to make this work. I started with a built-in template "Projects" that came with Access 2007. On the "Employee List" I can click on any cell and bring up the Employee Detail" corresponding to that particular cell. That works fine. I want to be able to open "Employee Detail" when I click on a cell in "Project Detail". I got to the point that "Employee Detail" opens but only to the frst record. PLEASE...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |