I have Seen Loads Of Post On This And I Have Spent The Last Hour Trying Everything I Come Across But Still Can Get What I Thought Was A Simple Thing To Work .. LOL
I Have 2 Forms
Vehicles
Defects
Emmedded In Vehicles Is A Subform In Datasheet Mode Of 4 Summary Fields From The Defects Form
The Records Visible In The Subform Are Automatically Filtered Depending On The Vehicle Record That Is Highlighted In The Vehicles Form.
The Field In Question Is DefectID And All I Want To Do Is Double Click The DefectID On The Datasheet And For It To Open Up That Record For Editting In The Defects Form.
Private Sub Defect_ID_DblClick(Cancel As Integer)
DoCmd.OpenForm "Defects", , , "[DefectID] = " & Me.Defect_ID
End Sub
Was My Last Effort
Can Anyone Help Out And Let Me Know Where Im Going Wrong
Ta
Stella
9 7202
Your last code should work the only thing I could think of is something like this
DoCmd.OpenForm "Defects", , , "[DefectID]=" & Me.Defect_ID, , acWindowNormal
Other than this check what is the name of your subform. Make sure its not defects. That is the property name not the form caption. Also in design view make sure that the On Dbl Click event on the Defect_ID field has [Event Procedure] in the field. Make sure that the field name is Defect_ID.
I have Seen Loads Of Post On This And I Have Spent The Last Hour Trying Everything I Come Across But Still Can Get What I Thought Was A Simple Thing To Work .. LOL
I Have 2 Forms
Vehicles
Defects
Emmedded In Vehicles Is A Subform In Datasheet Mode Of 4 Summary Fields From The Defects Form
The Records Visible In The Subform Are Automatically Filtered Depending On The Vehicle Record That Is Highlighted In The Vehicles Form.
The Field In Question Is DefectID And All I Want To Do Is Double Click The DefectID On The Datasheet And For It To Open Up That Record For Editting In The Defects Form.
Was My Last Effort
Can Anyone Help Out And Let Me Know Where Im Going Wrong
Ta
Stella
Thanks
i Will Give that A Go
To Clarify
2 Forms - 1 Called Vehicle 1 Called Defects
1 Subform Called Defects subform (Embedded In Vehicle Form)
Field Called DefectID (Control Source) txtDefectID (Name) On Defects Form
Field Called DefectID (Control Source) txtSubDefectID (Name) On Defects Sub Form
Am I Getting These Confused When Using The Where Condition
DoCmd.OpenForm "Defects", , , "[DefectID]=" & Me.Defect_ID, , acWindowNormal
This Gave Me A Compile Error With Defect_ID Highlighted
I Changed This To DefectID And Now I Get A Pop Up Box With The Value Of The Record On It , Asking For A Parameter..??
If I Click OK , It Just Shows The Form Defects With All Records Showing
If I Type in The Value In The Parameter Box I Get Exactly What I Want
Try this:
DoCmd.OpenForm "Defects", , , "[DefectID]=" & Me.txtSubDefectID, , acWindowNormal
This Gave Me A Compile Error With Defect_ID Highlighted
I Changed This To DefectID And Now I Get A Pop Up Box With The Value Of The Record On It , Asking For A Parameter..??
If I Click OK , It Just Shows The Form Defects With All Records Showing
If I Type in The Value In The Parameter Box I Get Exactly What I Want
I tried That After My Last Post
All I get Is A pop Up Box Asking For A Parameter Value
If i type In The Value I Want It Does What i Want It To Do , Exactly
If I type In A Different Defect ID , It Goes To That record , So SOmething Is Working
Just Above The Text Box Within The Enter Parameter Pop Up Shows The Value Of The Record i Clicked On
Ie , DefectID Test001
Last try:
DoCmd.OpenForm "Defects", , , "[txtDefectID]=" & Me.txtSubDefectID, , acWindowNormal
When you type in Me. there is a drop down list find the field txtSubDefectID and see if its there.
I tried That After My Last Post
All I get Is A pop Up Box Asking For A Parameter Value
If i type In The Value I Want It Does What i Want It To Do , Exactly
If I type In A Different Defect ID , It Goes To That record , So SOmething Is Working
Just Above The Text Box Within The Enter Parameter Pop Up Shows The Value Of The Record i Clicked On
Ie , DefectID Test001
With This One I Get 2 pop Up Boxes
1 Asking For txtDefectID , Then One Asking For Another Parameter
txtSubDefectID Is In The List When I type Me.
Somethings Not Right Somewhere.. LOL
Thanks For Your Help Tho
Heres The Code That Finally Got It Working
DoCmd.OpenForm "Defects", , , "[DefectID]='" & Me.txtSubDefectID & "'", , acWindowNormal
Heres The Code That Finally Got It Working
DoCmd.OpenForm "Defects", , , "[DefectID]='" & Me.txtSubDefectID & "'", , acWindowNormal
YEa... you probably have DefectID as a text field so you need the quotes around the value.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: chanchito_cojones |
last post by:
hi there,
I am needing some help with a database I am putting together. The database
works off of a main Form, which then has buttons on it that will open up
other forms. The problem I am having...
|
by: Lyn |
last post by:
Hi,
I have a Search input form which collects from the user a person's name. I
am using LIKE with a "%" suffix in the SQL so that the user does not have to
type in the full name. When they hit...
|
by: Thelma Lubkin |
last post by:
formA determines some_where and some_value and issues
docmd.close ,Me
docmd.openform "formB", , ,some_where, , ,some_value
formB receives the correct some_where and some_value
After...
|
by: Mike |
last post by:
I am trying to open a search results form based on the input from a
prompt form. I am using the following code:
--- Begin Code ---
Private Sub btnSearch_Click()
'Dim Variable and assign data...
|
by: news.onet.pl |
last post by:
Hello!
I have a question concerning to open the reports.
I know that DoCmd.OpenReport is a obsolete form of opening the reports, but
how to implement opening reports in VB using another VB code?...
|
by: Ryan |
last post by:
Hello. I was hoping that someone may be able to assist with an issue
that I am experiencing. I have created an Access DB which imports an
Excel File with a particular layout and field naming. ...
|
by: rdsandy |
last post by:
Hi,
I am using Access 2003. I have a list box on a form which has 6 columns in it, with data taken from a table. I have an unbound text box which holds the ID number for the selected item in the...
|
by: phill86 |
last post by:
Hi I have a main form that holds records for scheduled meetings, date time location etc... in that form i have a sub form that has a list of equipment resources that you can assign to the meeting in...
|
by: erict |
last post by:
Access 2002-2003 runtime
App works fine on single proc machines but we are rolling out a tech refresh and we found this case where the code appears to simply slip through the open form command and...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
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,...
|
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: 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,...
|
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...
|
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: 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...
| |