Bobby Heid
bheid at appdevgrp.com
Fri May 16 06:30:39 CDT 2003
To expand on Charlotte's explanation. You need to use Property Let instead of Property Set assuming that you really want to pass in a string. So your example would be: Private Property Let clubname(ByVal iname As String) ''set the attribute with the supplied name of the club mstr_clubname = iname End Property HTH, Bobby -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte Foust Sent: Thursday, May 15, 2003 8:57 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Property Set is used only for objects. If you are passing in a string, that string has to be used to instantiate an object, along the lines of : Set frm = forms(iname) Here's a sample from help: Property Set Pen(P As Object) Set CurrentPen = P ' Assign Pen to object. End Property Charlotte Foust -----Original Message----- From: Bruce Bruen [mailto:bbruen at bigpond.com] Sent: Thursday, May 15, 2003 4:05 PM To: accessd at databaseadvisors.com Subject: [AccessD] Dear List, Given the following is as simple as it looks, can anyone shed any light on the compile error that it generates? Option Compare Database Option Explicit Private mstr_clubname As String Private Property Set clubname(ByVal iname As String) <<<<----------error here! ''set the attribute with the supplied name of the club Set mstr_clubname = iname End Property ''returns the value of the clubname attribute Public Property Get clubname() As String clubname = mstr_clubname End Property The compile error is "Definitions of property procedures for the same property are inconsistent or contain optional parameters or a ParamArray" Not according to this little black duck! I've even asked a colleague to read the help file item on the error and she cant understand a word of it either, not that I believe it applies in any case. However, I have deleted EVERY other pice of code in the class module and the error is still there. Tia Bruce _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 2811 bytes Desc: not available URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030516/dfd425e8/attachment-0001.bin>