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

Combo box with a red border

P: 7
I am working with a large Access database and recently added a combo box to a form. The values that can be chosen from in the combo box are from a table I created with 6 possible choices. When I created the combo box the border showed up red. Now when I select one of the 6 choices in the combo box, it automatically populates this choice into all 6,000 records. How do I change it so I can pick one value for record #1 and then go to record #2 and choose a different value?

Thanks
Feb 15 '08 #1
Share this Question
Share on Google+
4 Replies


P: 7
This is Access 2003.
Feb 15 '08 #2

mshmyob
Expert 100+
P: 904
Can you post the code you have behind the Combo Box?

I am working with a large Access database and recently added a combo box to a form. The values that can be chosen from in the combo box are from a table I created with 6 possible choices. When I created the combo box the border showed up red. Now when I select one of the 6 choices in the combo box, it automatically populates this choice into all 6,000 records. How do I change it so I can pick one value for record #1 and then go to record #2 and choose a different value?

Thanks
Feb 15 '08 #3

P: 7
I'm not sure if this helps at all.This is what I got when I right clicked on the combo box in design view and selected Build Event...Code Builder. Is this what you're talking about?
Thanks
----------------------------


Expand|Select|Wrap|Line Numbers
  1.  Option Compare Database 
  2.  
  3. Private Sub Combo59_BeforeUpdate(Cancel As Integer)
  4.  
  5. End Sub
  6.  
  7. Private Sub Date_Completed_BeforeUpdate(Cancel As Integer)
  8.  
  9. End Sub
  10.  
  11. Private Sub Find_PAR_Click()
  12. On Error GoTo Err_Find_PAR_Click
  13.  
  14.  
  15. Screen.PreviousControl.SetFocus
  16. DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
  17.  
  18. Exit_Find_PAR_Click:
  19. Exit Sub
  20.  
  21. Err_Find_PAR_Click:
  22. MsgBox Err.Description
  23. Resume Exit_Find_PAR_Click
  24.  
  25. End Sub
  26. Private Sub Print_Form_Click()
  27. On Error GoTo Err_Print_Form_Click
  28.  
  29.  
  30. DoCmd.PrintOut
  31.  
  32. Exit_Print_Form_Click:
  33. Exit Sub
  34.  
  35. Err_Print_Form_Click:
  36. MsgBox Err.Description
  37. Resume Exit_Print_Form_Click
  38.  
  39. End Sub
  40. Private Sub Print_Record_Click()
  41. On Error GoTo Err_Print_Record_Click
  42.  
  43.  
  44. DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
  45. DoCmd.PrintOut acSelection
  46.  
  47. Exit_Print_Record_Click:
  48. Exit Sub
  49.  
  50. Err_Print_Record_Click:
  51. MsgBox Err.Description
  52. Resume Exit_Print_Record_Click
  53.  
  54. End Sub
  55.  
Feb 15 '08 #4

mshmyob
Expert 100+
P: 904
Nothing there for your combo box. Tell me what your property settings are for your Data TAB. Such as

Control Source
Row Source
Row Source Type
etc. etc.

I'm not sure if this helps at all.This is what I got when I right clicked on the combo box in design view and selected Build Event...Code Builder. Is this what you're talking about?
Thanks
----------------------------


Option Compare Database

Private Sub Combo59_BeforeUpdate(Cancel As Integer)

End Sub

Private Sub Date_Completed_BeforeUpdate(Cancel As Integer)

End Sub

Private Sub Find_PAR_Click()
On Error GoTo Err_Find_PAR_Click


Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Find_PAR_Click:
Exit Sub

Err_Find_PAR_Click:
MsgBox Err.Description
Resume Exit_Find_PAR_Click

End Sub
Private Sub Print_Form_Click()
On Error GoTo Err_Print_Form_Click


DoCmd.PrintOut

Exit_Print_Form_Click:
Exit Sub

Err_Print_Form_Click:
MsgBox Err.Description
Resume Exit_Print_Form_Click

End Sub
Private Sub Print_Record_Click()
On Error GoTo Err_Print_Record_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection

Exit_Print_Record_Click:
Exit Sub

Err_Print_Record_Click:
MsgBox Err.Description
Resume Exit_Print_Record_Click

End Sub
Feb 16 '08 #5

Post your reply

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