By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,395 Members | 2,513 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,395 IT Pros & Developers. It's quick & easy.

a better way to update?

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.