Access Form Event

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
I have a button on a form. When I click that button I want it to change the value of a field (Combobox) on that form. The field on the form is named _NO_BID_RANGE_01

I tried with no success:

Code:
Sub Command1000_Click()

[_NO_BID_RANGE_01] = "NB"

End Sub

here is the source selection for that combo: "BID";"NB";"NQ";"MIN"
 
Last edited:

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
How is the combobox populated?

Is it bound?
 
Upvote 0
Sorry for the delayed response. I was stuck in a meeting :( Yes the combobox is from a table.
 
Upvote 0
Does that table only have one field?
 
Upvote 0
No many fields, only one record so far, its under design phase
 
Last edited:
Upvote 0
MY BAD! I had more than one "Sub Command1000_Click()" in my code. once I deleted the other one, this worked.
 
Upvote 0
If you had 2 subs with the same name then the code wouldn't/shouldn't compile.:)
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top