PC Review


Reply
Thread Tools Rate Thread

Combo box Module

 
 
=?Utf-8?B?Sk9N?=
Guest
Posts: n/a
 
      1st Mar 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 nothing happens( I guess) but then my report will have a
statement "There was address no 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
How to use a combo box variable in a VBA module FSHOTT Microsoft Access 1 20th Jan 2010 08:46 AM
VBA code in one Module referencing Public Variables Declared inanother Module failing Khurram Microsoft Excel Programming 5 11th Mar 2009 11:01 PM
Problem calling Error Handler in Standard Module from Form Module =?Utf-8?B?Sm9obiBE?= Microsoft Access Form Coding 2 19th Apr 2007 02:26 AM
Pass combo box value to string variable in module magix Microsoft Excel Discussion 1 15th Dec 2005 03:48 PM
Split Database, Invoice Module and Payroll Module, (2) Instances of Access, Good,Bad ? Dave Elliott Microsoft Access Forms 0 25th Aug 2003 03:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:48 PM.