PC Review


Reply
Thread Tools Rate Thread

Adding the 2nd and 3rd condition

 
 
=?Utf-8?B?Sk9N?=
Guest
Posts: n/a
 
      27th Feb 2006
My form has a combobox with 3 choices in it: No, Yes, Unknown. If one
selects no, an input form pops up for one to enter a new Acct address
information. If the user selects Yes, then the address information is
supposed to be the same as the persons mailing address. If the person
selects unknown, then my report will have a statement "There was address
provided for the acctount"

how will I add the Yes part code and the unknown part code on my form.
if there is no need for the unknown code in my form then how will I put tha
information in my report?

Private Sub AcctDescrAvailable_AfterUpdate()
Dim strARG As String
Dim strSQL As String
Dim DocName As String
Dim LinkCriteria As String
Dim Response As Integer
Dim Cancel As Boolean

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

If AcctDescrAvailable.Value = "No" Then
strARG = _
"Account Information, SELECT MailAddressLine1 as
AcctAddrLine1,MailAddressLine2 as AcctAddrLine2, propCity as AcctCity,
MailState as AcctState,MailZipCode as AcctZipCode FROM tblAcctInfor where
[AcctID] = " & AcctID & ";"
DocName = "frmAcctDescInput"
DoCmd.OpenForm DocName, , , LinkCriteria, , , strARG
Else
strSQL = "UPDATE tblAcctInfor SET MailAddressLine1, MailAddressLine2,
MailCity, MailState, MailZipCode= null where [AcctID] =" & AcctID & ";"
CurrentDb.Execute strSQL
End If

End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding up sums only if condition is met Doc Behr Microsoft Excel Worksheet Functions 6 16th Aug 2009 12:42 PM
Adding a new condition Shhhh Microsoft Excel Discussion 2 6th Jun 2009 06:12 PM
Adding an IIF to a where condition? Frank Microsoft Access Macros 3 25th Aug 2008 09:34 PM
If formula---adding another condition hmsawyer Microsoft Excel Misc 6 29th Mar 2008 02:50 PM
Need Help Adding a 2nd Where Condition =?Utf-8?B?Um9iZXJ0IFQ=?= Microsoft Access Reports 10 29th Sep 2006 12:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:11 AM.