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

a better way to update?

I have table with membertype (number) and a dues required table
If the data in membertype is a 1, I want it to update my dues required
field which is Yes/No as a yes.--

what is the proper way to do this
I have been using an update query but is there a better way
thanks
Nov 12 '05 #1
2 1306
If you are updating all the records in your table, using an update query is
correct. If you are doing it for one record on a form, put the following code in
the AfterUpdate event of MemberType:

If Me!MemberType = 1 Then
Me!DuesRequired = True
Else
Me!DuesRequired = False
End If

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Anne" <am******@ns.sympatico.ca> wrote in message
news:ur*********************@ursa-nb00s0.nbnet.nb.ca...
I have table with membertype (number) and a dues required table
If the data in membertype is a 1, I want it to update my dues required
field which is Yes/No as a yes.--

what is the proper way to do this
I have been using an update query but is there a better way
thanks

Nov 12 '05 #2
PC Datasheet wrote:

If Me!MemberType = 1 Then
Me!DuesRequired = True
Else
Me!DuesRequired = False
End If


Or in one line:

Me!DuesRequired = (Me!MemberType = 1)

;-)

But the first way allows for more in the way of expansion, e.g.

If Me!MemberType = 1 Then
Me!DuesRequired = True
Msgbox "Don't forget these are required"
Call SendSomeMail()
Call RingSomeBell()
Call BlowAWhistle()
Else
Me!DuesRequired = False
End If

Pretty difficult in one line :-)

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
2
by: serge | last post by:
/* This is a long post. You can paste the whole message in the SQL Query Analyzer. I have a scenario where there are records with values pointing to wrong records and I need to fix them using an...
2
by: Bryan Olson | last post by:
The current Python standard library provides two cryptographic hash functions: MD5 and SHA-1 . The authors of MD5 originally stated: It is conjectured that it is computationally infeasible to...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
2
by: Anne | last post by:
I have table with membertype (number) and a dues required table If the data in membertype is a 1, I want it to update my dues required field which is Yes/No as a yes.-- what is the proper way to...
0
by: Eric Paul | last post by:
I have been in search of a better way to handle bulk inserts and updates into SQL 2000 using c# and while I have found a few different ways to accomplish this I was wondering what is considered to...
1
by: Rod | last post by:
I am writing my third ASP.NET application. Unfortunately for me, I get to work on these only once every few months (which doesn't help in trying to remember how to do everything). Anyway, I've...
2
by: msnews.microsoft.com | last post by:
Hello, I have the scenario. I m building an application either in asp.net or window application. This application is base on n-tier application model. Let us take example of Northwind Database in...
0
by: cwbp17 | last post by:
Have two oracle tables that have a FK relationship on ID column. Have one datagrid that displays all of the columns of both tables. What's the best approach on updating a row from the datagrid...
10
by: rcamarda | last post by:
I have created a table that contains buckets to hold activitives of enrollment for each of our admissions officer for each day of an enrollment session. I have an UPDATE that builds rolling totals...
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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.