473,498 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Comb Box not allowing record sellection

31 New Member
Hi All, I am hoping someone can please help me on this issue that I am stuck on.
I am creating a Fee generating program for our Hospital's medical offices. You are supposed to type in a number, and it will show you the Medicare Fee associated with that proceedure code (HCPC). There are 4 Fields:
HCPC, Modifier, Description, and Fee.

I created a form, in which I placed a combo box using a basic query, showing the first 3 fields. and a text box for the fee. the idea is to type in the combo box, and when you hit return, the fee will pop up. the reason I used the combo box, is that a record can have up to three modifiers, each with a different fee.
example:
HCPC Modifier Fee
10021 $20.00
10021 56 $25.00
10021 TC $23.00

I can type in, or click on the 10021 and it works fine. The problem I am having is when I try to click on one of the records in the combo box that has a modifier. It keeps defaulting back to the first record with the same HCPC. so if I click on 10021 with the TC Modifier, my Fee only shows $20.00. for some reason it will not allow me to select any records with Modifiers, unless I use my down arrow in the combo box to scroll through the records.

This is a problem, because the enduser needs to make sure they are picking the correct record.

Thank you in advance for any help,
Nick
Sep 12 '08 #1
7 1560
missinglinq
3,532 Recognized Expert Specialist
This really doesn't make sense. As set up, when typing in the HCPC code the Auto Expand feature will only take you to the first entry with that code. Continuing to type, i.e. trying to enter

10021 TC

won't move the selection down to that entry; Auto Expand only moves to the first entry of the bound field. But using your mouse to click on the entry for 10021 TC $23.00 certainly should select it and its fee.

I guess we'd better have a look at the code you use to assign the fee value to your record.

BTW, a combobox and the Auto Expand feature can be worked so that it is possible to type in 10021 TC and have that record selected.

Linq ;0)>
Sep 12 '08 #2
nsymiakakis
31 New Member
It does work when the enduser types in the CPT code, it does bring them to the first record, then they click on the drop down arrow on the combo box to see if there are any modifiers, if there are, they should be able to click onthe next line down, and that fee should pop into the fee text box. I think the reason it is not allowing me to pick the codes with modifiers, is because the combo box is bound to the HCPC field. I applogize, because I am learning as I go,but how can I show you my code that you had mentioned. I created the Form using the wizard, and I added the combo box. You can email me here and I can send you screen shots of my configuration.
Nick
Sep 12 '08 #3
nsymiakakis
31 New Member
Here is a snapshot of my code for the form.
Let me know if this helps.

Private Sub Combo8_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[HCPC] = " & Str(Nz(Me![Combo8], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Nick
Sep 12 '08 #4
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi. You need to rethink how you want to achieve this - perhaps you don't see it because you are too close to the problem, but you are selecting the value of one field only from the combo, HCPC, then searching for the first matching record - but the value searched for is not unique. In these circumstances Access cannot tell that the first occurrence it finds is not the one you want - it is the correct value after all.

Unless you combine in the modifier and the fee, there is no way that Access can 'know' that you don't want the first occurrence, you want the next and so on.

In case you are thinking that this is something to do with the combo box, it too is doing what you have asked of it. You are selecting the HCPC value (bound to an underlying field, so if you change it that value is changed) - but if you consider only the sequence of values you are selecting you will see what I mean about non-uniqueness:

10021
10021
10021

It's because these are all the same that neither your FindFirst routine nor your combo can match the other values - you have not set it up to do so. In one way or another you need to combine the values together to make them unique - Access cannot read your mind here, it only does what you tell it to do - and as you can see you have not actually distinguished the values chosen in any way.

By the way, it is not normal practice to use a bound combo box as a means of selecting (or filtering) records; the bound field value is being changed every time you make a selection - is this your intention? The norm is to use an unbound control for this purpose, as any changes you make to it to find or select records will not affect field values in the underlying records of the form concerned.

-Stewart
Sep 12 '08 #5
missinglinq
3,532 Recognized Expert Specialist
The light dawns! This is going to take a lot more time than I have right now to walk you thru this, but I'll try to get back to it tonight or failing that first thing in the morning with a full explanation.

The problem is that you're not retrieving information from your underlying table, then using it to populate your record, you're actually retrieving the record from the underlying table!

When you used the Wizard to create your combobox you selected the third option "Find a record on my form based on the value I selected in my combobox" and it does just that! This feature is designed, for instance, to enter a patient ID number and have it retrieve that patient's record. For this feature to work correctly, the first, bound field has to be unique for each record, and of course it isn't in this case. The bound field is the HCPC code, and there are several records in your combobox's underlying table that have this same HCPC code. The code used behind the combobox, if you notice, uses FindFirst and that's exactly what it does, it finds the first occurrence of that code number, and retrieves that record. You can click on another row in your combobox, say one with the same HCPC code but a qualifier, but it's still going to only retieve the first one with the correct code number, in this case the one without any qualifier.

What you need to do is to retrieve information from a table other that the one your record is based on, then plug that information into your current record! This is something entirely different!

As I said, I'll get back to you later with more details on what you do need to do to get this thing back on track. For right now, you may as well delete the combobox you have, create a new one, leaving the default choice of "I want Access to look up values in a table or query." in place, then walk thru the rest of the Wizard'd Wonk.

Linq ;0)>
Sep 12 '08 #6
nsymiakakis
31 New Member
Thank you everyone for the information. Now I see what I am doing wrong. Thank you for helping me with this. Hopefully I will learn more about access with your help.
Nick
Sep 13 '08 #7
missinglinq
3,532 Recognized Expert Specialist
Glad we could help, Nick! Let us know if you need any further help!

Linq ;0)>
Sep 13 '08 #8

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

Similar topics

5
1708
by: Mark Feller | last post by:
I want to provide users a page where they can browse entries in a database 10 at a time, for example. I am doing this as a table, where each row is a database entry. I want to be able to give the...
7
9491
by: Claudio Grondi | last post by:
Googling for keywords like "direct access sector harddrive Python module Windows" seems to give no useful results. Any hints(best if cross-platform)? Claudio
2
1554
by: Mr Man | last post by:
Is it possible to set the combo-box drop down list default to zero or blank. Sometimes when you first view it, or not selected any data the box has a selection in it, so you're not sure whether...
3
1346
by: sakuragirl1 | last post by:
I am working on my second Access project and have run into an issue I cannot get around nor find info on. I have a form, with a subform in datasheet view. Within the subform I have a hyperlink...
4
2325
by: Torilyn73 | last post by:
I have a combo box set up off a query. I want the default value to be the column heading so I don't have to put a label over it. So far I haven't been able to figure this out. Can anyone tell me if...
2
2458
by: HSD | last post by:
database not allowing multiusers -------------------------------------------------------------------------------- Background An ACCESS database containing two tables and three forms has been...
2
2862
by: Certys | last post by:
Hello, I have a form where I only allow new records to be added. I enable this by setting the form property "Data Entry" to Yes. I want to access other records in the same table- to autofill...
3
1621
by: jayo17 | last post by:
I have access 2003 on Windows XP. So what i am trying to do is edit a record in a table based off of a specific combo box selection. I know how to make the combo box change the values in a table...
0
1100
by: csauer | last post by:
I am writing a program using visual basic.NET 2003 to be used to update and store data in a database I have stored in Access 2003. I am using a OdbcDataAdapter to generate my dataset, then using a...
0
7125
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
7165
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
7379
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
5462
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
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.