Notices



Reply
 
LinkBack Thread Tools Display Modes

Old 02-19-2008, 01:58 PM   #1 (permalink)
Junior Member

Join Date: Sep 2007
Posts: 10
Rep Power: 0 ramckinn is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- API/VBA

VBA and Combo Boxes

Silly question ..

I am trying to populate a combo box with "donor" and "TFRS" and when the user clicks on one of them it sets the constituent code to whatever option they chose. I need to make sure the code doesn't already exist though. Here is my code thus far. Any idea where I'm going wrong.

Dim oconstituent As CRecord
Dim oconstit As New CConstituentForm
Dim oconstits As CConstituentCode
'This procedure will be called each time a record of the specified type is closed
Public Sub Gift_CloseRecord()
If oconstits.Fields(CONSTITUENT_CODE_fld_CODE) <> "DONOR" Then
UserForm1.ActiveControl.SetFocus
UserForm1.ComboBox1.AddItem ("DONOR, 0")
UserForm1.ComboBox1.AddItem ("TFRS, 1")
End If
If UserForm1.ComboBox1.ListIndex = 0 Then
oconstits.Fields(CONSTITUENT_CODE_fld_CODE) = "DONOR"
Else
If UserForm1.ComboBox1.ListIndex = 1 Then
oconstits.Fields(CONSTITUENT_CODE_fld_CODE) = "TFRS"
Else
End If
End If
Exit Sub
End Sub


Thanks in advance,
Rachel A. McKinney
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
combo boxes


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
Forum Jump


Rent Games - Cheap Gas - Loans - Phoenix Pools
All times are GMT -6. The time now is 11:18 AM.

Miscellaneous


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by BBpixel Team 2008 :: jvbPlugin R1012.364.1

SEO by vBSEO 3.2.0 Copyright 2008 Blackbaud User SocietyAd Management by RedTyger
Inactive Reminders By Icora Web Design

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64