Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 conditional synchronization of combo box

Author  Topic 

jeeve01
Starting Member

25 Posts

Posted - 2010-07-31 : 04:04:22
'---Subform Module----

Private Sub DocNumber_AfterUpdate()

Dim Doc As Variant
'--- firt condition
If Left(Me.DocNumber, 2) = "CI" Then
Me.Amount.RowSource = "SELECT CIAmount FROM" & _
" tblChargeInvoices WHERE Right(CINumber,5) = " & Right(Me.DocNumber, 5) & _
" ORDER BY CIAmount"
Me.Amount = Me.Amount.ItemData(0)
Else
Me.Amount.Text = Doc '--- 2nd condition
End If
End Sub


i want to ignore the first condition and manually enter the data in [subform].[Amount] control if the data entered in [subform].[DocNumber] start with "CI*".

Does anyone have an idea with this.

thank you.

SMerrill
Posting Yak Master

206 Posts

Posted - 2011-04-29 : 23:03:16
I see that you are saying
IF <condition> THEN
Amount.Rowsource=...
ELSE
Amount.Text=...
I think you need to set
rowsource=""
in the ELSE statement, first of all.

~ Shaun Merrill
Seattle area
Go to Top of Page
   

- Advertisement -