I am new at Access, databases, AND posting threads (sorry). I have a subform that is a continuous form based on a tabular query. I enter a particular serial # (on the main form) and the subform shows me one to several forms that are related to that serial #. Each form shows only a few select fields of that particular record. I would like to be able to click a Veiw button (which is a cmd button on this subform) to bring up yet another form that would show ALL of the fields of that ONE SAME record. I've gotten as far as being able to get the view button to work when I have just the subform, itself, open. However, when I have the main form open (which then means the subform is also open), and click the View button, I get a dialog box to enter a parameter. Of course, once entered, the form pops up with the correct record referenced. Any help would be a godsend! Thanks! (Oh...Access 2003/XPPro)
4 13398 MMcCarthy 14,534
Recognized Expert Moderator MVP
I am new at Access, databases, AND posting threads (sorry). I have a subform that is a continuous form based on a tabular query. I enter a particular serial # (on the main form) and the subform shows me one to several forms that are related to that serial #. Each form shows only a few select fields of that particular record. I would like to be able to click a Veiw button (which is a cmd button on this subform) to bring up yet another form that would show ALL of the fields of that ONE SAME record. I've gotten as far as being able to get the view button to work when I have just the subform, itself, open. However, when I have the main form open (which then means the subform is also open), and click the View button, I get a dialog box to enter a parameter. Of course, once entered, the form pops up with the correct record referenced. Any help would be a godsend! Thanks! (Oh...Access 2003/XPPro)
What code are you using behind the view button?
NeoPa 32,568
Recognized Expert Moderator MVP
Yes, This will be a query of some form I suspect. Can you post the SQL of the query too if you use a QueryDef (saved query) in your code.
From your post it sounds like your query is using a parameter of some form. We need to replace that with the selection from your form but need the details first to know exactly how to.
Thanks for your replies, but I figured it out in the meantime! All I had to do was to use the cmd button wizard! Geez! I had created the button, originally, thinking I would have to use some specially created macro, so I had skipped the wizard... It created the following event procedure: - Private Sub cmdView_Click()
-
On Error GoTo Err_cmdView_Click
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "frmViewSerNum"
-
-
stLinkCriteria = "[idsNCRNum]=" & Me![idsNCRNum]
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
-
Exit_cmdView_Click:
-
Exit Sub
-
-
Err_cmdView_Click:
-
MsgBox Err.Description
-
Resume Exit_cmdView_Click
-
-
End Sub
I'll be posting with some other problem soon, I'm sure! Thanks again!
NeoPa 32,568
Recognized Expert Moderator MVP
That's fine and thanks for replying.
It's actually better when the OP finds the solution themselves. It indicates learning and growth :)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Crispywafers |
last post by:
Hi all,
This seems like it would be fairly simple, but quite frankly I can't
figure it out. I have combed through other posts and still can't get
it working.
I have two tables (Students, Emergency Contacts) and two seperate main
entry forms for each table (frmNewStudent & frmEmergencyContacts). I
wanted to put a command button on frmNewStudent that when clicked
would open up frmEmergencyContacts to an add new record so that a user
|
by: simonmarkjones |
last post by:
Hi there when i open a form in Access 2000 i would like to present the
user with a new empty record (I dont want them to be able to view the
first or any other records).
I'm guessing i would put something in the On Open event perhaps. Not
too sure.
Many thanks in advance.
|
by: John |
last post by:
Hi
If I have a form open, what is the code that is equivalent to using the
File->Print menu with select record(s) option to print the form with the
currently displayed record values?
Thanks
Regards
|
by: anansi |
last post by:
Hi
I have a form called 'shiftviewer' and it contains a subform called 'all shifts for current month subform'. the subform is in datasheet view (access 2007) and the main form is a column orientated form.
Both forms contain records of 'shifts'
I want to be able to select a record (a shift) in the subform, and be able to set the parent form's current record to that record, through the identifying primary key that a shift record has...
|
by: SDave |
last post by:
I have read several responses to this problem around the web, but my programming knowledge wasn't strong enough to translate those responses to my problem.
I have a database with one table, the primary key of this table is called ID Number (It is a number, not a string). There are two forms in the database, and I made a button to switch from one form to the other. When I am in Form1, I want to be able to click the button to go to Form2, while...
| |
by: WyvsEyeView |
last post by:
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...
|
by: awojciehowski |
last post by:
I am assuming this is an easy fix but I want to open a form from a switchboard button. I also want the form to automatically open to the last record of that form.
Any ideas on how I can accomplish this?
Thanks!
Adam
|
by: reginaldmerritt |
last post by:
Hi,
I'm using the following code to open a form on a specific record. I have a form displaying records in a list which then allows users to click onto the record to open it up in a new form in a single view.
DoCmd.OpenForm "FRMBookingDetails", , " = " & Me.BookingID
The form opens only on the first record only and never the chosen record. Sometimes it opens the form on a new record.
|
by: Adam Tippelt |
last post by:
I've got a form that allows users to "save the current record to drafts" if they haven't finished writing all the data for that record. This saves it in it's current state, which puts it in a temporary table. The record is also tagged with the name of the user who created it.
What I'm trying to do is to force the form to open up and load this record when the form is loaded/opened. The structure of the database only allows users to have one...
|
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...
|
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: 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: 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: 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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |