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

problems with changing the defaults

7
I'm trying to change the default property for a check box field on a form as well as a a particular property of that form. After I run the code both the form and the control start behaving the way I expect they should after the change, but their properties, in fact, never change.

Here's the code to swap between the Dynaset and Snapshot RecordsetType properties in the form. After its execution, when I reopen the form, however, it is always a Dynaset (which is what I manually set the property to when I first created the form) even after my code changed to Shapshot.

Private Sub MoBasedOnTbl_Click()
'If your current settting is Dynaset change it to Snapshot
If Me.RecordsetType = 0 Then
Me.RecordsetType = 2
'If it's Snapshot make it Dynaset
Else
Me.RecordsetType = 0
End If
End Sub

Here I grab the currrent value in a Check Box field on the form and make it a default one for that field. Again, after I reopen the form the default value equals to whatever I manually set the that property to when I first created the field.

Private Sub MonthsBasedOnChck1Av_AfterUpdate()
Dim a As Boolean
a = Me.MonthsBasedOnChck1Av.Value

If a = 0 Then
Me.MonthsBasedOnChck1Av.DefaultValue = 0
Else
Me.MonthsBasedOnChck1Av.DefaultValue = -1
End If
End Sub

If anybody knows the solution, please, help!
Aug 1 '07 #1
0 904

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

Similar topics

17
by: FDYocum | last post by:
I am having problems with a Web site that I've designed and I am grinding my teeth in frustration. The pages are built around a table with four cells. The first cell is spanned two rows and is...
1
by: Brandon Potter | last post by:
Curious if there's a way to change designer defaults in VS.NET 2003; most notably change which font is selected by default for a new Windows Form, etc. Since we're past Windows 3.1 design, the...
3
by: Abby Lee | last post by:
I found the following script somewhere so I can change values to money before the form is printed. The page works for most people but not some. It worked fine for me but I get the yellow tri-angle...
10
by: Xah Lee | last post by:
today i need to use Python to decompress gzip files. since i'm familiar with Python doc and have 10 years of computing experience with 4 years in unix admin and perl, i have quickly located the...
5
by: Mark Fox | last post by:
Hello, When you add a new web form in VS.NET it automatically adds the following namespaces at the top: using System; using System.Collections; using System.ComponentModel; using...
0
by: Scott C. | last post by:
We are building a web application that allow's the users to change the defaults of a their pages. Here is a list of what I've done so far 1.) Return the control names, control properties and...
2
by: John Mullin | last post by:
We are having a problem which appears similar to a previous posting: http://groups.google.com/groups?hl=en&lr=&frame=right&th=d97f552e10f8c94c&seekm=OZw33z9EDHA.2312%40TK2MSFTNGP10.phx.gbl#link1 ...
3
by: EasyKev | last post by:
We have been trying to upgrade all our C++ projects from VC6 to VS .Net2003 for a while (before VS 2005 arrived), and seem to be stuck now because of the performance degradation seen for the same...
2
by: Sonnich | last post by:
hi all! I use ezPDF like this $pdf = new Cezpdf('a4','potrait'); $tmp = array( 'b'=>'Courier-Bold.AFM', 'i'=>'Courier-Oblique.AFM', 'bi'=>'Courier-BoldOblique.AFM',
1
by: PowerLifter1450 | last post by:
I've been having a very rough time installinig mySQL on Linux. I have been following the instructions form here: http://www.hostlibrary.com/installing_apache_mysql_php_on_linux Everytime I get to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.