473,394 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Can you add a combo box after click a button to a form?

I am new to access but i have a little bit of SQL knowledge. I am just wondering if you can add a combo box in a running form without going to design view.

The idea is "I want to borrow an multiple asset from asset table and save the Barcode ID of asset to Borrow Table." However, in a form you are limited on the combo box that you input in design.

Is there any possible way in VBA or SQL query to do this task?
Mar 26 '15 #1
3 1170
jforbes
1,107 Expert 1GB
Unlike .Net, you can't add controls at Runtime in Access.

You might get what you want by adding some controls and setting the Visible property to False. Then in code, you can set the Visible property to True. Also in code, you can set the ControlSource of a control and it will set the binding on the fly giving you a Late Binding scenario.
Mar 27 '15 #2
I found how to make the combo box invisible and visible once you choice an input.

http://bytes.com/topic/access/answer...ox-create-code

However, I am not familiar with late binding in VBA.
Mar 28 '15 #3
jforbes
1,107 Expert 1GB
If you have things working for you the way you want, that is great.

The Late Binding Scenario I mentioned isn't a truly Late Binding, but it is very similar and seemed to be the most descriptive way to explain it with out getting too wordy.

The wordy version is that you can place a Control on a Form during design time and leave the Control Source blank. This Control is then considered Unbound (no Control Source). Then after the Form is running, the Control Source can be set in VBA and Access will data bind the Control to the Database field and it will work. Which to me, is pretty amazing. You can then change the Control Source again and again and Access will continue to work. You can even change the Record Source of the Form along with changing the Control Source and Access will continue to work.

This technically isn't Late Binding, probably more of a Data Binding in Code, but again, I was trying not to be too wordy.
Mar 30 '15 #4

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

Similar topics

0
by: [Yosi] | last post by:
I search solution for a little bit strange problem , I working on an application which includes a button. Click on this button will create number of threads each one execute deferent executable...
5
by: Steve | last post by:
Hi, Is it possible to make hitting the enter key in an ASP textbox run the code behind an ASP button on a form? I have a search page which users tend to type in the query then just hit enter...
0
by: NSF12345 | last post by:
I have made a small application, and I have an invisible, or slightly transparent, form so that you can see through it at whats underneath. However, i would also like to make it a CLICK TROUGH form...
0
by: Franky | last post by:
I have a MDI form open and two child forms open in it. Each of the children contains a usercontrol which contains a richtextbox. The topmost form's caption bar is highlighted but I click on the...
0
by: radders | last post by:
Hi guys, What I'd like to do is place three edit boxes with three static text labels on a click button. This would let the user input RGB values to the three edit boxes and then click the...
3
by: eddie69 | last post by:
Hi, Newbie question here: I am creating an application in VB Studio 2005 which reads the status of an USB PIR Motion sensor. So far, I have managed to get the application to read the motion...
12
by: Thammarat charoenchai. | last post by:
Hi, I'm try to learn vb.net. in delphi have .click method for click button by coding. Can I do that with vb.net Thank you very much.
5
by: laziers | last post by:
Hi, anyone know how to write a single-cilick button? I use this: <asp:button id="ButtonAdd" runat="server" text="Anuluj" onclick="Click_ButtonAdd" /> if ( !isPostBack){...
0
by: sarvmardan | last post by:
how to open a report in access containing filtered data using two combo boxes on form and a button to click. let i have two fields and other is . two comboboxes are combo11 and combo9. plz post...
4
by: kw127533 | last post by:
I'm using option button form controls in Excel and I can't seem to figure out how to change the font size. When I right click, there is a 'format control' option, however, there is no font options...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.