473,695 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unbound Combobox not displaying data as expected ... need HELP, please.


Greetings!

Still the same application (as previous posts). I worked on the app
while at work (don't tell my boss ... cause this is just for fun and not
work related) and the form was working, but now when I try to repeat the
code at home (for real) it won't work. I suspect that I haven't
replicated the logic and forms at home from what I remember that I did
while at work.

My subform is based on a table called "tblTrialCl ass" and it has a bound
control called [classID]. [classID] is a FK from "tblClasses ". The
values are 1, 2, 3 representing the text "Novice", "Open", "Utility".
The [classID] control's VISIBLE property is set to False.
The subform, also, has an unbound combobox called [cboClass]. The
recordsource is:

SELECT tblClasses.clas sID, tblClasses.clas s
FROM tblClasses
ORDER BY tblClasses.clas sID;

First column has a width of 0", so the dropdown only shows the text.
Bound column is the first column (classID).

The table called "tblClasses " has two columns: classID (autonumber, key)
and class (text).

The subform has the following VBA code behind it:

Private Sub cboClass_AfterU pdate()
Me![classID] = Me!cboClass.Col umn(0)
End Sub

Private Sub cboJudge_AfterU pdate()
Me![judgeID] = Me!cboJudge.Col umn(0)
End Sub

Private Sub Form_Current()
Me![cboClass] = Me![classID]
Me![cboJudge] = Me![judgeID]
End Sub

(I haven't mentioned the Judge fields, but they have the same problem)

When the form is opened, whether dynamically by the outter parent form,
or manually by me when testing the subform; [cboClass] has "Novice"
displaying for all records, even though the value of [classID] is not
always = 1. I tested this out by making the [classID] visible to verify
the data.

QUESTION:
How do I synchronize the combobox data with the bound integer field
[classID]?

I am pulling my hair out on this one. It's so simple, I'm sure.

Thanks,
SueB
*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
2 2506
rkc
Susan Bricker wrote:
Greetings!

Still the same application (as previous posts). I worked on the app
while at work (don't tell my boss ... cause this is just for fun and not
work related) and the form was working, but now when I try to repeat the
code at home (for real) it won't work. I suspect that I haven't
replicated the logic and forms at home from what I remember that I did
while at work.

My subform is based on a table called "tblTrialCl ass" and it has a bound
control called [classID]. [classID] is a FK from "tblClasses ". The
values are 1, 2, 3 representing the text "Novice", "Open", "Utility".
The [classID] control's VISIBLE property is set to False.
The subform, also, has an unbound combobox called [cboClass]. The
recordsource is:

SELECT tblClasses.clas sID, tblClasses.clas s
FROM tblClasses
ORDER BY tblClasses.clas sID;

First column has a width of 0", so the dropdown only shows the text.
Bound column is the first column (classID).

The table called "tblClasses " has two columns: classID (autonumber, key)
and class (text).

The subform has the following VBA code behind it:

Private Sub cboClass_AfterU pdate()
Me![classID] = Me!cboClass.Col umn(0)
End Sub

Private Sub cboJudge_AfterU pdate()
Me![judgeID] = Me!cboJudge.Col umn(0)
End Sub

Private Sub Form_Current()
Me![cboClass] = Me![classID]
Me![cboJudge] = Me![judgeID]
End Sub

(I haven't mentioned the Judge fields, but they have the same problem)

When the form is opened, whether dynamically by the outter parent form,
or manually by me when testing the subform; [cboClass] has "Novice"
displaying for all records, even though the value of [classID] is not
always = 1. I tested this out by making the [classID] visible to verify
the data.

QUESTION:
How do I synchronize the combobox data with the bound integer field
[classID]?


Get rid of your unbound controls.

Make your classID control a combobox instead of a textbox. Keep it
bound to the classID field, make it visible, set it's rowsource
property to tblClasses, colum count to 2 and column widths to 0;1.

That's all there is to it. You don't need your afterupdate or current
events code. Access handles the updates and displays the correct text
for you.

Nov 13 '05 #2

rkc,

Thank you for your input and patience. Your suggestions worked. Now I
can get on with the rest of my day!!! (I was going to stick with this
until I got it to work). Maybe I shouldn't thank you ... I have lots of
housecleaning and errands to do.

Thanks again.
Regards,
SueB
*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
19169
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal Report at runtime? Example: private void button1_Click(object sender,
3
3776
by: Dos Lil | last post by:
I have a unbound field in the subform(for calculating the datediff) which has the control property ==DateDiff("n",,). I have another unbound field in the main form which is for displaying the datediff from the subform.I have set the controls source = .Form! FRM- TimeSheet Subform is the name of the subform and TXTTtalHoursworked is the name of the unbound field in the subform.
7
3265
by: Susan Bricker | last post by:
Sorry..I keep hitting the wrong key and sending the post too soon... The problem: COMBOBOX not displaying all possible rows. The RecordSource (generated by SQL view of the Query Builder) is: SELECT tblTPSTeam.empID, & " " & AS ReqAnalyst FROM tblTPSTeam ORDER BY tblTPSTeam.lname; I have gone to Form Design and displayed the RecordSource of the
6
1780
by: Doug Bell | last post by:
Hi I have a datagrid with a combo box, I need to populate the combo with data dependant on the record value. eg for record 1, field Warehouse = 2R so combo would allow selection of locations valid for 2R record 2 has Warehouse = 2M so combo on that row has a selection of locations valid for 2M I can set the combo datasource but can't see how to set it on a row by row basis.
3
2752
by: google | last post by:
I'm developing an application for use within my company in Access 2003. I'm new to '03, the application I did for my former employer was in '97. The two applications have similar functionality (we're sales offices, and I'm doing things such as associate directories, commission calculations, order tracking, etc.). 2003 seems to have a few extra features, but I seem to continually run in to oddities that seem like they SHOULD work, but...
4
1814
by: JJGarcia | last post by:
Hi Everyone, I'll try to explain the process I'm following, I'm new to this so I'm triying the easy way first, probably the lasyest too! I created a new Project, drag in to it a SQLConnection, configured, dragged an Dataadapter per each table I need it, then generated the dataset, after that, I stablished the relations between tables, then, went over to the datasources, choose the parent datasource and clicked on the + sign, it...
3
11265
by: Richard | last post by:
How is the result of query placed in a unbound textbox ? Suppose CriteriaLookups has columns TableName, KeyColumn, KeyValue, DataColumn Foo,x,11,xhat Bar,z,3,xyzzy And
6
2679
by: Volker Neurath | last post by:
Hi all, I have a Problem with combobox-property "NotInList" and an unbound Form. The situation: On my main form i have three comboboxes for data-exchange (here: Names of distributor, reseller and final customers, the whole database is made for storing information about quotatations - no, not for quoting itself) ut the boxes actually may not contain all our distributors and reseller's
11
5163
by: jwessner | last post by:
I have a form (Form1) which contains basic Project data and a subform listing the personnel assigned to the Project as a continuous form. Selecting a person on that project and clicking on a command button will open a new form (Form2). Form2 has two subforms. Both are embedded in the main form. (Subform2 is NOT embedded in subform1.) Subform1 displays records as a continuous form based on the Primary ID of the main form and lists the...
0
8625
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8565
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8977
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8841
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8822
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4339
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2997
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 we have to send another system
2
2269
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.