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

Compile Error Method or Data Member not found

35 32bit
Good morning,

I am not an experienced user and have a basic question. I have a main form named Test Cases which has a subform called TestSteps. The subform TestSteps has a field named StepDescription. I want the user to be able to click on the field StepDescription and open another form UnitTestCase. I want Unit Test Case to open where StepDescription on TestSteps matches TestCaseID on UnitTestCase. Both fields are text fields.

Here is the code I am using
Expand|Select|Wrap|Line Numbers
  1.  Const cstrForm As String = "UnitTestCase"  
  2.     DoCmd.OpenForm cstrForm, WhereCondition:="[TestCaseID]=" & Me.StepDescription
  3.     End Sub
I am getting a compile error that StepDescription Compile Error Method or Data Member not found.

Can anyone assist? I really appreciate the help!
Dec 1 '14 #1
4 1565
twinnyfo
3,653 Expert Mod 2GB
Rhonda,

Have you thought of making UnitTestCase a subform? If the relationships and forms are built properly, the form should automatically filter based on the desired field.

It is difficult to tell exactly how your forms/tables are related to each other, although we can make certain assumptions based on your description.
Dec 1 '14 #2
rhonda6373
35 32bit
Please disregard my first message -- I found a mistake and corrected it.
Dec 1 '14 #3
twinnyfo
3,653 Expert Mod 2GB
OK - Glad you found a resolution.
Dec 1 '14 #4
zmbd
5,501 Expert Mod 4TB
Line 2 of code.
Might I suggest that you create the conditional as a separate string first, then use the string viable in the function. The string can then be tested for missing values before making the call to the function.

Expand|Select|Wrap|Line Numbers
  1.    Const cstrForm As String = "UnitTestCase"
  2.    Dim strconditional as string
  3.    strconditional = "[TestCaseID]=" & Me.StepDescription
  4. '
  5. 'Now a debug.print can show you the result
  6. 'or you can test to see if the strconditional
  7. 'has a value from me.stepdescription
  8. '
  9.    DoCmd.OpenForm cstrForm, WhereCondition:= strconditional
  10. End Sub
  11.  
Dec 2 '14 #5

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

Similar topics

0
by: Kenny G | last post by:
Hello, Got a small problem: I built a small table and used the following on my laptop this morning. This code compiled and worked fine on my laptop but when I compiled the first Sub on my...
2
by: bradleyp | last post by:
Hi all, Hopefully somebody can help. In Access 2002-SP2, I receive an error from the VB Editor if I try to compile the following code (see below). The error is as follows: Compile Error:...
0
by: mazda_88 | last post by:
I have a number of tables inside a dataset. I have a repeater that I need to bind to. The data that is needed resides in two tables in the dataset. Here is the code that I'm using: Dim...
1
by: Tim::.. | last post by:
Can some one please tell me why I'm getting this error! I presume it is because there is something wrong with my Database connection but am not really sure what! Thanks ...:: Error ::.....
5
by: solrium | last post by:
Good morning, Thanks in advanced.... and Here are the basics: VB 6.3 on W2K, Using for WRQ Reflections for IBM (v 13.0) Visual Basic Editor (built into the above mainframe) - As most...
3
by: DThreadgill | last post by:
Upon trying to compile my db, I get the following error - "Compile Error - Method or Data Member Not Found" and it highlights the .backcolor of the following code Private Sub...
1
by: jayjayplane | last post by:
I have two combo boxes on my form, let's say box1(s1_individual_session) and box2(s1_nationality1), initially I disable box2(gray-out). I want to select box1 value is "true" then enable the box2, ...
15
by: Elizabeth Mitte | last post by:
Hello, Before I ask my question, I want to say how good this forum is and how much help it has been to a complete novice. At this moment in time I am having trouble creating VBA syntax (I think...
1
by: cate | last post by:
Pls help I encountered this error when I entered an amount in premium... Private Sub PREMIUM_AfterUpdate() Me.DOC_STAMP = Format(Me.PREMIUM * 0.125, "#,##0.00") Me.LGT =...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
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...
0
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...
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...

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.