Solved

Property

Posted on 2000-05-11
6
226 Views
Last Modified: 2013-11-23
Hello, I have a class where i try to create a property. I have this declarations.

Private Au_Id as integer


Property Let SetName(vNew as variant)..
Au_Id = vNew
end property

Property Get SetName ....
UID = Au_Id
end property


The assignment to Au_Id works but when it access teh Get procedure thevalue of Au_Id is set to Nothing. Why ?
0
Comment
Question by:vnd
  • 3
  • 2
6 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 2799769
Private Au_Id as integer

Property Let SetName(vNew as variant)..
  Au_Id = vNew
end property

Property Get SetName() As Integer
  'UID = Au_Id
  'Should be
  SetName = Au_Id
end property


0
 
LVL 1

Expert Comment

by:manchula
ID: 2799773
Au_ID is not set to nothing.

The proc must be,

Property Get SetName ....
SetName = Au_Id
end property
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 2799796
manchula, I just said the same thing, it is considered bad form to "jump" for points. Whilst 20 points may not be anything to worry about, the principles of the site are to expand knowledge and skills. Posting answers straightaway especially when the answer you post has already been given as a comment is not considered good behaviour. I know that you are relatively new to EE but I would suggest that you don't continue to jump in in this way otherwise you risk complaints regarding your behaviour.

A questioner has the ability to "Accept a comment as answer" so there really is no need to post answers in this manner. This is the second occasion that I have noticed you posting an answer without adding significantly to previous comments, and in this case repeating what was already said.

vnd,

If you are happy with my answer, please reject manchula's and accept my comment or ask for further clarification. I will be happy to help if you need more information on why your original code didn't work and why the suggested solution will.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Expert Comment

by:manchula
ID: 2799860
Timcotte, did you check the time of my posting? There's only a minute difference between yours and mine. Do you think that I copied your comment & made that as answer? If so, sorry I can't help you.
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 20 total points
ID: 2799875
I can see that you did not just copy my comment! I am merely pointing out that posting an answer in this way is not necessarily helpful.

In similar cases, I have found that most "experts" would apologise on realising that someone else had already made the same comment/answer or at least recognise the fact that someone else has done so.
0
 

Author Comment

by:vnd
ID: 2800051
Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question