473,407 Members | 2,315 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,407 software developers and data experts.

Form/Field Behavior

Tom
I have a continuous form with a combobox. Rowsource for the cbo is a
lookup table with 2 fields (chID and chName).

Intent is to select an item from the cbo and have it displayed in the
cbo with the second field from the look up table displayed in a text
box (txtName) on the form.

Recordsource for the form is an inner join between the main table and
the lookup table with all of the main table fields and chName.

The working table only stores the chID value - not chName, since I can
always look that up.

So I would expect that when I select an item in the cbo, txtName would
immediately display the corresponding chName value.

That's not happening. If I close and reopen the form, it will fill in
as expected. If I put me.requery in the cbo's afterupdate, it fills
in (but thats undesirable since it changes the active record). But if
I just move off the dirty record txtName stays blank.

How do I get txtName to fill in after selecting a value in the cbo
without requerying the form or otherwise saving the record.

Thanks

Oct 9 '07 #1
3 1683
bsn

"Tom" <rt*****@swbell.netskrev
Intent is to select an item from the cbo and have it displayed in the
cbo with the second field from the look up table displayed in a text
box (txtName) on the form.
You set the secon field in the afterupdate event in cbo...

Cbo_AfterUpdate
Me.txtName = cbo.Column(1)
End Sub

Bjarne
Oct 10 '07 #2
Tom
TBjarne:

Thanks - but that doesn't work. The problem with that approach is
that the control source for txtName is chName from the lookup table -
I end up getting an error msg saying "The changes you requested to the
table were not successful because they would create duplicate values
in the indes, primary key or relationship..."

I can't make the txtName field unbound since this is a continuous form
with multiple records displayed...

Any other thoughts?

Thanks

Tom

Oct 10 '07 #3
bsn

"Tom" <rt*****@swbell.netskrev>
Any other thoughts?
Make the formular to a datasheet...
Use the same code (other mail...)
Bjarne
Oct 10 '07 #4

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

Similar topics

2
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own...
10
by: Andres Eduardo Hernando | last post by:
Hi, I'm not entirely sure this is the right group to ask this question, but I saw a similar one above, and the group's charter is not clear enough about it, so, here I go: ;) What is the...
4
by: John Fereira | last post by:
So, one of the limitations of multipart-form handling is that when an <input type="file" ..> tag is used it will bring up a window which allows a user to select a file for upload but won't allow...
11
by: John Baker | last post by:
Hi: I have a form which contains the following entry ( one element on each line) Name Address line 1 Address line 2 city, state, zip In many cases there is only ONE address line filled in...
2
by: cefrancke | last post by:
I have a form (no underlying record set) that has two separate sub-forms on it. Each sub-form has data from two different tables. Above each sub-form there is one unbound combo box with a SQL...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
5
by: Mike Dee | last post by:
Is it possible to dynamically create a new form object (form1), then create a new form field object and add it form1, and then add form1 to the current document? I need to do all this in script...
4
by: john | last post by:
I created a form via the wizard with 1 main table and 2 one-on-one tables. As i couldn't add a field to the form (a field that I added to the table after creating the form), I googled out that the...
3
by: cyber0ne | last post by:
Probably another easy question... I have two data tables. One holds the main data, the other holds additional data on a many-to-one relationship with the main data. Using the forms wizard, my...
11
by: newbie | last post by:
i have a form in which a hidden field (initial value as '0', and my javascript set it to '1' when an event is trigged). In the same form, i have a reset field. But I realized that the hidden field...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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.