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

not populating all of my textboxes from selection in cbobox?????

P: 29
for some reason all of my textboxes are not getting the required data. only the name, company and email txtboxes are getting the data.

control source is NULL
record source = dbo_table
Expand|Select|Wrap|Line Numbers
  1. Private Sub cboGoToContact_AfterUpdate()
  2.        Me.txtFirstname = Me.cboGoToContact.Column(1)
  3.        Me.txtCompany = Me.cboGoToContact.Column(2)
  4.        Me.txtTitle = Me.cboGoToContact.Column(3)
  5.        Me.txtEmail = Me.cboGoToContact.Column(4)
  6.        Me.txtAddress = Me![cboGoToContact].Column(5)
  7.        Me.txtCity = Me.cboGoToContact.Column(6)
  8.        Me.txtZip = Me.cboGoToContact.Column(7)
  9.        Me.txtPhone = Me.cboGoToContact.Column(8)
  10.        Me.txtFax = Me.cboGoToContact.Column(10)
  11.        Me.txtCell = Me.cboGoToContact.Column(11)
  12.        Me.txtState = Me.cboGoToContact.Column(12)
  13.        Me.txtNotes = Me.cboGoToContact.Column(13)
  14.        Me.txtwebpage = Me.cboGoToContact.Column(14)
  15.        Me.txtCountry = Me.cboGoToContact.Column(15)
  16.        Me.Refresh
  17.  
  18. End Sub
  19.  
I doubled checked all my textboxes names and they match up. Can anybody tell me what they think it could be? I am using an SQL server as my backend database.
Oct 12 '07 #1
Share this Question
Share on Google+
3 Replies


nico5038
Expert 2.5K+
P: 3,072
Guess you know that the Column() property is "zero based" and thus entry 1 fro the recordsource is entry Column(0).

Personally I wouldn't use this, but add a (single) subform to the mainform and link that to the unique ID of the combobox. Thus the "filling" is done by Access and no code is needed.

Nic;o)
Oct 12 '07 #2

P: 29
Guess you know that the Column() property is "zero based" and thus entry 1 fro the recordsource is entry Column(0).

Personally I wouldn't use this, but add a (single) subform to the mainform and link that to the unique ID of the combobox. Thus the "filling" is done by Access and no code is needed.

Nic;o)
yeah, my column(0) is CONTRACTID which I dont want to display. I will give the subform a try.

at first I really thought access applications was neat because of the reports and templates MS has but nothing seems to work right for me. If I can figure out how to print reports with vb.net I probably would use that for my applications if my boss lets me. Do you know of any good websites on access vba?
Oct 12 '07 #3

nico5038
Expert 2.5K+
P: 3,072
yeah, my column(0) is CONTRACTID which I dont want to display. I will give the subform a try.

at first I really thought access applications was neat because of the reports and templates MS has but nothing seems to work right for me. If I can figure out how to print reports with vb.net I probably would use that for my applications if my boss lets me. Do you know of any good websites on access vba?
I know the feeling :-)
The Access reports are however great, but you'll need to understand the working of the grouplevels (The [= looking button) as they control the levels and sorting.

One good Access site is: www.mvps.org/access

Nic;o)
Oct 12 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.