need help i cant work out were values are saved to??

rob.low

Access Nutter
Local time
Today, 07:54
Joined
Dec 27, 2007
Messages
96
need help i cant work out were thease values are saved to??

Hi there.
I downloaded a demo database (attached, Expiry 200 ) witch allows me to distribute my databases in demo mode with the option of registering a full copy.
this works a treat so far. :)
but now i want to modify the code but i cant work out were the values in the frmsetexpiry are saved to (the registry maybe?) IE: max number of times, company name etc.

any help will be much appreciated with this
thanks
rob
 
Last edited:
They are being saved to newly created Database Properties in the standard module.
 
They are being saved to newly created Database Properties in the standard module.

hi thanks for the reply. :)

i cant see were :confused:
any chance you could explain were in more detail
many thanks
rob
 
Have you looked in the modExpiry standard module and examined the code?
 
Have you looked in the modExpiry standard module and examined the code?

hi
thanks for your help
sorry I'm not that good with modules

say i set the company name to redbridge.. i cant find any refs to redbridge in the module?

its probably staring me in the eyes but i cant see it
sorry to be a pain
rob
 
It is this section of code that is saving the company name.
Code:
        Set p = .Properties("LKCompanyName")
        If Err = 3270 Then
            Set p = .CreateProperty()
            p.Name = "LKCompanyName"
            p.Type = dbText
            p.Value = 0
            .Properties.Append p
            Err.Clear
        Else
            p.Value = sCoName
        End If
 
It is this section of code that is saving the company name.
Code:
        Set p = .Properties("LKCompanyName")
        If Err = 3270 Then
            Set p = .CreateProperty()
            p.Name = "LKCompanyName"
            p.Type = dbText
            p.Value = 0
            .Properties.Append p
            Err.Clear
        Else
            p.Value = sCoName
        End If

ok but i cant see the company name i put in the form "redbridge" were is it stored i cant see any tables .. so cant see any referances to redbridge that i typed in the form
thanks for helping
rob
 
Actually now that I look at it, that section of code seems to have an omission. You should be able to see these properties after they are created by going to File>Database Properties...
Code:
        Set p = .Properties("LKCompanyName")
        If Err = 3270 Then
            Set p = .CreateProperty()
            p.Name = "LKCompanyName"
            p.Type = dbText
            p.Value = [COLOR="Red"]sCoName[/COLOR]
            .Properties.Append p
            Err.Clear
        Else
            p.Value = sCoName
        End If
 
Actually now that I look at it, that section of code seems to have an omission. You should be able to see these properties after they are created by going to File>Database Properties...
Code:
        Set p = .Properties("LKCompanyName")
        If Err = 3270 Then
            Set p = .CreateProperty()
            p.Name = "LKCompanyName"
            p.Type = dbText
            p.Value = [COLOR="Red"]sCoName[/COLOR]
            .Properties.Append p
            Err.Clear
        Else
            p.Value = sCoName
        End If

ok im lost loll :)
if you cant see it i never have a chance to loll
but any ideas to how this is happening?
thanks
rob
 
Here's another function you can add to the module and run from the immediate window that will show you the Database properties.
Code:
Function ShowProperties()
Dim Counter As Integer
Dim prpLoop As Property
'----   Enumerate Properties collection of the database.
   With CurrentDb
      Debug.Print "Properties of " & .Name
      Debug.Print "Starting the loop"
      Counter = 1
      For Each prpLoop In .Properties
         If prpLoop.Type <> 0 Then
            If prpLoop.Type <> 15 Then
               Debug.Print "Property Type:  [" & prpLoop.Type & "]  [" & Counter & "]"
               Debug.Print "Property:       [" & prpLoop.Name & "] = [" & prpLoop & "]"
            Else
               Debug.Print "Property:       <" & prpLoop.Name & "> = <" & prpLoop & ">"
            End If
         End If
         Counter = Counter + 1
      Next prpLoop
   End With

End Function
 
Here's another function you can add to the module and run from the immediate window that will show you the Database properties.
Code:
Function ShowProperties()
Dim Counter As Integer
Dim prpLoop As Property
'----   Enumerate Properties collection of the database.
   With CurrentDb
      Debug.Print "Properties of " & .Name
      Debug.Print "Starting the loop"
      Counter = 1
      For Each prpLoop In .Properties
         If prpLoop.Type <> 0 Then
            If prpLoop.Type <> 15 Then
               Debug.Print "Property Type:  [" & prpLoop.Type & "]  [" & Counter & "]"
               Debug.Print "Property:       [" & prpLoop.Name & "] = [" & prpLoop & "]"
            Else
               Debug.Print "Property:       <" & prpLoop.Name & "> = <" & prpLoop & ">"
            End If
         End If
         Counter = Counter + 1
      Next prpLoop
   End With

End Function

hi there
im not sure how to run this code and not sure what it will do .. sorry im just not good at modules
could toy explain more
thank you
rob
 
Paste the code I supplied in post #10 into the module below the current two functions. Then hold down the Ctrl key and press G (^G) which brings up the immediate window. Now type ShowProperties in that immediate window and hit Return and see what happens.
 
Paste the code I supplied in post #10 into the module below the current two functions. Then hold down the Ctrl key and press G (^G) which brings up the immediate window. Now type ShowProperties in that immediate window and hit Return and see what happens.

hey ruralguy thanks a lot :D
i see it now fantastic :)

just wondering why i couldn't see in the module with out using the code u gave me :confused:

any way thanks for your help wit this and your patience

cheers
rob
 

Users who are viewing this thread

Back
Top Bottom