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

"Implying" entries

Looking for suggestions.
I am working on a database that records test responses. The test materials
are grouped into 7 categories.
I created a form with 2 combo boxes. The first selects the category -which
value is used to limit the record source of the second. The second selects
the material -which value is used to limit the records viewed in the detail
section of the form.
Using continuous forms layout I am able to see all the tests for that
material only. (Which is what I want.) The problem is I want to avoid
displaying the material name in the detail section. If I add a new record
using this form the material ID is set to "0" instead of the value of the
second combo box.
Thank you for your comments.
Nov 12 '05 #1
2 1163
Dave,

In the form's BeforeUpdate event, set the MatrialID to Me.ComboBox2:

if Me.NewRecord then MaterialID = Me.ComboBox2.

This assumes that ComboBox2 returns MaterialID. If it does not, you can
add it to it in another column, and hide it by setting Width to 0.
Cheers,
Pavel

Dave the wave wrote:

Looking for suggestions.
I am working on a database that records test responses. The test materials
are grouped into 7 categories.
I created a form with 2 combo boxes. The first selects the category -which
value is used to limit the record source of the second. The second selects
the material -which value is used to limit the records viewed in the detail
section of the form.
Using continuous forms layout I am able to see all the tests for that
material only. (Which is what I want.) The problem is I want to avoid
displaying the material name in the detail section. If I add a new record
using this form the material ID is set to "0" instead of the value of the
second combo box.
Thank you for your comments.

Nov 12 '05 #2
"Dave the wave" <Bo****@softhome.net> wrote in message
news:wq********************@adelphia.com...
Looking for suggestions.
I am working on a database that records test responses. The test materials
are grouped into 7 categories.
I created a form with 2 combo boxes. The first selects the category -which
value is used to limit the record source of the second. The second selects
the material -which value is used to limit the records viewed in the detail section of the form.
Using continuous forms layout I am able to see all the tests for that
material only. (Which is what I want.) The problem is I want to avoid
displaying the material name in the detail section. If I add a new record
using this form the material ID is set to "0" instead of the value of the
second combo box.
Thank you for your comments.

....material ID is set to 0?
Could you mean Category ID? In any case check whether you have set a
default value of zero in your table design, and consider whether it helps
you in any way. If not, remove it.

The easiest and most common way to do this sort of thing would be to use a
form / subform combination. The main form would have the 7 categories and
the subform contains the materials. This is also a reliable,
tried-and-tested, zero-code solution.

If you are not persuaded by that, then you will need to write code in the
update event of the form, soemthing like

If Nz(Me!MaterialCat, 0) > 0 Then
' Category already known
Else
Me!MaterialCat = cboMaterialCat
End If
Fletcher

Nov 12 '05 #3

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

Similar topics

5
by: Quentin Crain | last post by:
Hello All! Could someone explain (links are good too!) why: >>> 1+"1" Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: unsupported operand types for +: 'int' and...
2
by: ggg | last post by:
In regards to mod_python, I keep getting this warning when I do apachectl configtest: Loaded DSO libexec/mod_python.so uses plain Apache 1.3 API, this module might crash under EAPI! (please...
23
by: raj | last post by:
I used to remember why c++ needed both ? Could somebody help me here ? For example class A{ f(); }; A* aa;
24
by: jrefactors | last post by:
I have an upload file operation in the web application. UploadForm.jsp is the form, and UploadAction.jsp is the form processing. The web server is Websphere. //UploadForm.jsp <FORM...
86
by: Randy Yates | last post by:
In Harbison and Steele's text (fourth edition, p.111) it is stated, The C language does not specify the range of integers that the integral types will represent, except ot say that type int may...
22
by: campbellbrian2001 | last post by:
Thanks in Advance! ... I have two textboxes: 1 is visible (and gets its value based on the invisible textbox and displays either "Male" or "Female", and needs to display either male of female based...
43
by: markryde | last post by:
Hello, I saw in some open source projects a use of "!!" in "C" code; for example: in some header file #define event_pending(v) \ (!!(v)->vcpu_info->evtchn_upcall_pending & \...
28
by: fred.haab | last post by:
Not having server side scripting, I've been doing this for "last modified" tags on my pages: <div class="modified"> <script type="Text/JavaScript"> <!-- document.write("This page was last...
94
by: Samuel R. Neff | last post by:
When is it appropriate to use "volatile" keyword? The docs simply state: " The volatile modifier is usually used for a field that is accessed by multiple threads without using the lock...
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?
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
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...
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,...

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.