473,796 Members | 2,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unknown Problem from a beginner

12 New Member
In my database, I want to let it calculate some equations when I press a button. However when I do press the button, it states "Compile error: Method or data member not found". It highlights "Private Sub Command49_Click ()" in yellow and ".P1Score" in blue. What does this mean?
The problem only arised when I added the section of P1 to P10 on. It was working fine before with just the S1 to S5. Does this mean that I don't have an object named P1Score while I have an object for S1Score? How do I find out what is S1Score in design view? Is there a find option or something?
I know that when I type "Me." it shows up a list and it is S1Score to S5Score but no PxScore. How do I fix this?
Is it something to do with AccessField? If so, what is it and how do I set P1Score as an accessfield?
Thank you in advance for your help and assistance! I've attached the code below. If you need more info to answer this question, please inform me. Thank you!

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command49_Click()
  2.  
  3.     answered = checkAllAnswered()
  4.  
  5.     If answered = False Then
  6.         Exit Sub
  7.     End If
  8.  
  9.     S1 = IIf(IsNull(Me.S1Score) Or Me.S1Score = 0, 1, CInt(Me.S1Score))
  10.     S2 = IIf(IsNull(Me.S2Score) Or Me.S2Score = 0, 1, CInt(Me.S2Score))
  11.     S3 = IIf(IsNull(Me.S3Score) Or Me.S3Score = 0, 1, CInt(Me.S3Score))
  12.     S4 = IIf(IsNull(Me.S4Score) Or Me.S4Score = 0, 1, CInt(Me.S4Score))
  13.     S5 = IIf(IsNull(Me.S5Score) Or Me.S5Score = 0, 1, CInt(Me.S5Score))
  14.     P1 = IIf(IsNull(Me.P1Score) Or Me.P1Score = 0, 1, CInt(Me.P1Score))
  15.     P2 = IIf(IsNull(Me.P2Score) Or Me.P2Score = 0, 1, CInt(Me.P2Score))
  16.     P3 = IIf(IsNull(Me.P3Score) Or Me.P3Score = 0, 1, CInt(Me.P3Score))
  17.     P4 = IIf(IsNull(Me.P4Score) Or Me.P4Score = 0, 1, CInt(Me.P4Score))
  18.     P5 = IIf(IsNull(Me.P5Score) Or Me.P5Score = 0, 1, CInt(Me.P5Score))
  19.     P6 = IIf(IsNull(Me.P6Score) Or Me.P6Score = 0, 1, CInt(Me.P6Score))
  20.     P7 = IIf(IsNull(Me.P7Score) Or Me.P7Score = 0, 1, CInt(Me.P7Score))
  21.     P8 = IIf(IsNull(Me.P8Score) Or Me.P8Score = 0, 1, CInt(Me.P8Score))
  22.     P9 = IIf(IsNull(Me.P9Score) Or Me.P9Score = 0, 1, CInt(Me.P9Score))
  23.     P10 = IIf(IsNull(Me.P10Score) Or Me.P10Score = 0, 1, CInt(Me.P10Score))
Dec 7 '07 #1
5 1297
JustJim
407 Recognized Expert Contributor
In my database, I want to let it calculate some equations when I press a button. However when I do press the button, it states "Compile error: Method or data member not found". It highlights "Private Sub Command49_Click ()" in yellow and ".P1Score" in blue. What does this mean?
The problem only arised when I added the section of P1 to P10 on. It was working fine before with just the S1 to S5. Does this mean that I don't have an object named P1Score while I have an object for S1Score? How do I find out what is S1Score in design view? Is there a find option or something?
I know that when I type "Me." it shows up a list and it is S1Score to S5Score but no PxScore. How do I fix this?
Is it something to do with AccessField? If so, what is it and how do I set P1Score as an accessfield?
Thank you in advance for your help and assistance! I've attached the code below. If you need more info to answer this question, please inform me. Thank you!
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command49_Click()
  2.  
  3.     answered = checkAllAnswered()
  4.  
  5.     If answered = False Then
  6.         Exit Sub
  7.     End If
  8.  
  9.     S1 = IIf(IsNull(Me.S1Score) Or Me.S1Score = 0, 1, CInt(Me.S1Score))
  10.     S2 = IIf(IsNull(Me.S2Score) Or Me.S2Score = 0, 1, CInt(Me.S2Score))
  11.     S3 = IIf(IsNull(Me.S3Score) Or Me.S3Score = 0, 1, CInt(Me.S3Score))
  12.     S4 = IIf(IsNull(Me.S4Score) Or Me.S4Score = 0, 1, CInt(Me.S4Score))
  13.     S5 = IIf(IsNull(Me.S5Score) Or Me.S5Score = 0, 1, CInt(Me.S5Score))
  14.     P1 = IIf(IsNull(Me.P1Score) Or Me.P1Score = 0, 1, CInt(Me.P1Score))
  15.     P2 = IIf(IsNull(Me.P2Score) Or Me.P2Score = 0, 1, CInt(Me.P2Score))
  16.     P3 = IIf(IsNull(Me.P3Score) Or Me.P3Score = 0, 1, CInt(Me.P3Score))
  17.     P4 = IIf(IsNull(Me.P4Score) Or Me.P4Score = 0, 1, CInt(Me.P4Score))
  18.     P5 = IIf(IsNull(Me.P5Score) Or Me.P5Score = 0, 1, CInt(Me.P5Score))
  19.     P6 = IIf(IsNull(Me.P6Score) Or Me.P6Score = 0, 1, CInt(Me.P6Score))
  20.     P7 = IIf(IsNull(Me.P7Score) Or Me.P7Score = 0, 1, CInt(Me.P7Score))
  21.     P8 = IIf(IsNull(Me.P8Score) Or Me.P8Score = 0, 1, CInt(Me.P8Score))
  22.     P9 = IIf(IsNull(Me.P9Score) Or Me.P9Score = 0, 1, CInt(Me.P9Score))
  23.     P10 = IIf(IsNull(Me.P10Score) Or Me.P10Score = 0, 1, CInt(Me.P10Score))
Hi,
It seems to me that you must have controls on your form (the one where Command49 is) has controls called S1Score etc but there is no controls called PxScore. It may be that they are called TextPxScore or some other default Access name. You have two choices, change the code to match the control names or change the control names to match the code.

Jim

ps. A thread title more indicitave of your problem would help!
JJ
Dec 7 '07 #2
HotKgon
12 New Member
Hi,
It seems to me that you must have controls on your form (the one where Command49 is) has controls called S1Score etc but there is no controls called PxScore. It may be that they are called TextPxScore or some other default Access name. You have two choices, change the code to match the control names or change the control names to match the code.

Jim

ps. A thread title more indicitave of your problem would help!
JJ
Is a control an object that you put on in design view? if so, I don't know where S1Score control is.... I'm trying to extend an existing database so I don't actually know what S1Score.
I have 5 tick boxes which are in a frame. And the control source is from a table with the column S1Score. I replicated this frame and changed the control source to P1Score. I also copied all the coding which is associated with S1Score and renamed it to be P1Score. Yet it still doesn't work. I don't know what the S1Score control is so therefore I can't make a P1Score control to replicate it. Is there a way to find the S1Score control in design view?

BTW, are controls the things which pop down in a list after you type the dot for "Me."?

I also looked into the object browser and search for S1Score. It came back that S1Score is a member to 5 different classes (all forms). I did the same for P1Score and it was only a member of 1 class. How do I add P1Score as a member for the other classes which S1Score is a member of?

I really have no clue in access so I have no idea what a control and things are. Sorry about the inconvience!

JJ, Thank you very much for you reply!

-HotKgon
Dec 7 '07 #3
JustJim
407 Recognized Expert Contributor
Is a control an object that you put on in design view? if so, I don't know where S1Score control is.... I'm trying to extend an existing database so I don't actually know what S1Score.
I have 5 tick boxes which are in a frame. And the control source is from a table with the column S1Score. I replicated this frame and changed the control source to P1Score. I also copied all the coding which is associated with S1Score and renamed it to be P1Score. Yet it still doesn't work. I don't know what the S1Score control is so therefore I can't make a P1Score control to replicate it. Is there a way to find the S1Score control in design view?

BTW, are controls the things which pop down in a list after you type the dot for "Me."?

I also looked into the object browser and search for S1Score. It came back that S1Score is a member to 5 different classes (all forms). I did the same for P1Score and it was only a member of 1 class. How do I add P1Score as a member for the other classes which S1Score is a member of?

I really have no clue in access so I have no idea what a control and things are. Sorry about the inconvience!

JJ, Thank you very much for you reply!

-HotKgon
Well HotKgon, you have been dropped in it right royally haven't you?

Make a copy of the database application using Windows Explorer so we don't break the first one. Not likely, but why take the risk, you should always work on a development version, not the working one.

You need to look at the table (in design view) which has S1Score in it. Try to figure out what (if any) are the differences in the SxScore fields. Then you need to add a new field for each PxScore (P1Score, P2Score etc) and save the table.

Now go to your form and, with the wizard button pressed on the toolbox, add an option group. See how you go from there. You might want to delete the original option group first and just add one with all the score fields in it at once.

Once you've got it working, either do it all again in the real application (good practice) or rename the table and form in the real application and import both the new table and new form from the development app.

Have fun and 'AveAGoodWeeken d

Jim

ps after you type Me. you get offerred the whole gamut of things from Methods, Objects, Properties. This will include controls on your form and is a very, very good reson for adopting a naming convention such as prefixing all text boxes with txt so that they group together when you are in this list.
Dec 7 '07 #4
HotKgon
12 New Member
thank you once again JJ. I found out that if I click on "add existing fields", put PxScore and made it invisible. It ends up working!
Dec 8 '07 #5
JustJim
407 Recognized Expert Contributor
thank you once again JJ. I found out that if I click on "add existing fields", put PxScore and made it invisible. It ends up working!
Good one.

Jim




(message too short my armpit!)
Dec 9 '07 #6

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

Similar topics

0
2935
by: Robert | last post by:
did you solve this problem? It seems to be still present here with py2.3.5. Robert -- From: Manish Jethani <manish.j@gmx.net> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en
2
8675
by: Amy | last post by:
This is what I want to do: 1. Delete all tables in database with table names that ends with a number. 2. Leave all other tables in tact. 3. Table names are unknown. 4. Numbers attached to table names are unknown. 5. Unknown number of tables in database. For example:
1
1719
by: imw8n4u | last post by:
I need to create combo box that lists unique values from a table and limit the selection to this list. However, I also need to add "UNKNOWN" as a valid selection even though it is not in the table I am using as the source for the combo box. Can this be done? Thanks!
5
20449
by: Lars-Erik Aabech | last post by:
Hi! Guess it's my day again.. Tried to deploy a test release of a new asp.net web today, and got a terrible error. The web is running swell on three development computers, but when it's copied to the test server it won't work at all. Looks like aspnet_wp is trying to compile it for five seconds, then it stops working what so ever. The system event log gets the following entry: Application popup: aspnet_wp.exe - Application Error : The...
17
8628
by: Barret Bonden | last post by:
As an old programmer just now looking at VB.net I have a question: How does one simply open one form from another ? I don't mean how does one create a new instance of that form , but rather how to refer to THAT form ? And having done this, how does one get data to and from that form ? I have read the MS tutorial on this but it is senselessly complex; there must be a simple, straightforward method, or I can only assume that MS has...
9
10750
by: Klaus Johannes Rusch | last post by:
IE7 returns "unknown" instead of "undefined" when querying the type of an unknown property of an object, for example document.write(typeof window.missingproperty); Has "unknown" been defined as a valid return value for the typeof operator in a later version of ECMAScript or is this a JScript "feature"? -- Klaus Johannes Rusch
5
13694
by: fjanon | last post by:
Hi, I went through the HTML spec without finding the description of what the browsers behavior should/must be regarding tags or attributes they don't understand. I did a quick experiment like this: <mytag style='display:none'> <h3>Hello</h3>
1
4588
by: tactech | last post by:
Hello Can somebody help me and tell me why I can’t change the background color of the second PN2 panel. I get this error about unknown source Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException at test$myFreakingListener.actionPerformed(test.java:34) at java.awt.Button.processActionEvent(Unknown Source) at java.awt.Button.processEvent(Unknown Source)
2
7396
by: Calvin Cheng | last post by:
Hi, I am attempting to convert a bunch of .txt files into html using the docutils package. It works for most of the txt files except for the index.txt file which gives 2 errors: (1) <Error/3Unknown Directive type "toctree" (2) (ERROR/3) Unknown interpreted text role "ref".
4
4039
by: omono84 | last post by:
I know that this should be rather simple but i seem to be missing a step to get it to work. and have been unable to find a solution on the net. The aim is that I click on the open button to find and open an unknown workbook that contains the data that I need to imput into my current workbook, once the unknown workbook is opened it should automatically select my range (number of columns known, but number of rows unknown- the number of rows...
0
10459
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, 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...
0
10237
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 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...
0
10018
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9055
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, 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...
0
6795
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();...
0
5446
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...
1
4120
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
2
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
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...

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.