473,408 Members | 1,722 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,408 software developers and data experts.

Set focus but record not selected

1
I have a main form (Orders), a subform (OrderDetails) and a separate form (Products).

The OrderDetails is a child form of Orders.
Products form is opened via a button on Orders.

There is an image of the product on the product form that on the On_Click event loads the product into a combo box on the subform OrderDetails.
I use SetFocus but that only sets the focus to the combo box but does not actually record the selection.
I have to click the drop down and select the product from the list again to record it.

How can I actaully select the record not just set the focus.

Thank you for your help.
Mar 30 '23 #1
1 13152
NeoPa
32,556 Expert Mod 16PB
Hi Donraf.

Welcome to Bytes.com.

I haven't played with this in a while but I believe that the way you select an item within a ComboBox from your code is to set the .Value of the ComboBox to the value that matches the product. This changes based on which column is treated as the value column, but generally in such situations it's either the name, description or ID column.

I believe there's also a .Dropdown() method for ComboBoxes so you can even get it to drop down for the user if you really want to draw their attention to it ;-)
Mar 30 '23 #2

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

Similar topics

0
by: Javed Iqbal | last post by:
hi, i open a project in .net ide, open different files for editing. the problem is when i select a file, this file does not get focus in solution explorer. can any body help me??. thanks in...
5
by: WindAndWaves | last post by:
Hi Gurus I have a very simple question this time. I have a continuous form with a textbox (ID number) and a label. The label has a on_click event: msgbox me.id.value If I click on the...
1
by: Rasmus | last post by:
I need to grab focus to a specific node i my treeview when I click on my listbox. Here's the code that differs between the different event i the listBox: private void...
4
by: gordon | last post by:
Hi I hav e a smallish app that has a datagridview. A user can select some columns in the datagrid, and i have a button that i would like to use to copy the rows that are selected to the...
6
by: probashi | last post by:
Hi, Issue: After post back selected item of a list box is getting out of focus (when it contains more items than it's size). I have a List Box in an ASPX page. I select an item from the...
7
by: dscarbor | last post by:
I have a simple form with 4 fields, and a subform that retrieves records that are potential matches based on a query. The user will use the ID from the subform record and enter it into one of the...
4
by: Deano | last post by:
I have a little search routine going whereby the user types in some text and clicks a button on the main form. I then see if that text exists in a record on the subform. I get a match, grab the...
5
by: Gilberto | last post by:
Hello, I have a textbox where the user enters a category for a product selected on a combo box. The user has to select a LOT of products and most of the time he enters them in order of category,...
10
by: Nick Cooper | last post by:
With all Access databases I have used, when I select to delete a record in Form view, the next record becomes the background for the message asking if I really want to delete a record. That makes it...
14
by: ablevins | last post by:
I have a access searchable form that displays results in a subform. One of the fields in the subform results is ImagePath. I want to be able to select a record from the results, then click a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.