After trying a combo box to do this.
its tied to a lookup table
name value
yes 1
no 0
they wanted to be able to type in a 1 but display a yes in the field.
and store a 1 in the table.
so I set the combo box to
bound col 2 and col widths as 1";.0093"
and set the table to store it in q12 a text field.
it would not allow this.
so I thought I would get clever and capture the ascii string on keyup
and put that in
Select Case KeyCode
Case Asc("0"):
Me.q12.Value = "0"
Case Asc("1"):
Me.Me.q12.Value = "1"
Case Else:
End Select
well I get a 0 and it displayed a No in the field and put a 0 in the
table.
good enough I though..
but on further testing it only worked that once..NOT sure why it
worked at all...
how can I do this ???
I am stumped
thanks for any help
Jerry 5 1725
Rather than trying all those awkward work-arounds, why not use the logical
(Boolean) field type that Access already has called "Yes/No". It
formats/displays input as "true/false" or "yes/no" or "on/off" while storing
data as 0 or -1. You can set the default to either Yes or No and use a text
control, or better still, a checkbox for user
input.
-Ed
"sparks" <js******@swbell.net> wrote in message
news:qt********************************@4ax.com... After trying a combo box to do this. its tied to a lookup table name value yes 1 no 0
they wanted to be able to type in a 1 but display a yes in the field. and store a 1 in the table.
so I set the combo box to bound col 2 and col widths as 1";.0093" and set the table to store it in q12 a text field. it would not allow this.
so I thought I would get clever and capture the ascii string on keyup and put that in
Select Case KeyCode Case Asc("0"): Me.q12.Value = "0" Case Asc("1"): Me.Me.q12.Value = "1"
Case Else:
End Select
well I get a 0 and it displayed a No in the field and put a 0 in the table.
good enough I though..
but on further testing it only worked that once..NOT sure why it worked at all...
how can I do this ???
I am stumped
thanks for any help
Jerry
Well the main reason is the next page they are wanting to change so
that it will be yes,no,missing
then another to be set to yes,no, unknown
they are not data entry people and want everything displayed but want
a quick way to enter it..and y n u (auto complete) is not an option
with them..
Jerry
On Fri, 12 Aug 2005 16:46:02 GMT, "Ed Robichaud" <ed*********@wdn.com>
wrote: Rather than trying all those awkward work-arounds, why not use the logical (Boolean) field type that Access already has called "Yes/No". It formats/displays input as "true/false" or "yes/no" or "on/off" while storing data as 0 or -1. You can set the default to either Yes or No and use a text control, or better still, a checkbox for user input. -Ed
"sparks" <js******@swbell.net> wrote in message news:qt********************************@4ax.com.. . After trying a combo box to do this. its tied to a lookup table name value yes 1 no 0
they wanted to be able to type in a 1 but display a yes in the field. and store a 1 in the table.
so I set the combo box to bound col 2 and col widths as 1";.0093" and set the table to store it in q12 a text field. it would not allow this.
so I thought I would get clever and capture the ascii string on keyup and put that in
Select Case KeyCode Case Asc("0"): Me.q12.Value = "0" Case Asc("1"): Me.Me.q12.Value = "1"
Case Else:
End Select
well I get a 0 and it displayed a No in the field and put a 0 in the table.
good enough I though..
but on further testing it only worked that once..NOT sure why it worked at all...
how can I do this ???
I am stumped
thanks for any help
Jerry
whoops sorry I keep hitting return and this news reader sends it auto
they want yes-1 no-2 and missing-8 on one question and then unknown
will be 9 and so on..so they hit numbers, store numbers in the table
but the form displays yes or whatever they want.
hope this makes since
Jerry
On Fri, 12 Aug 2005 17:05:45 GMT, sparks <js******@swbell.net> wrote: Well the main reason is the next page they are wanting to change so that it will be yes,no,missing then another to be set to yes,no, unknown
they are not data entry people and want everything displayed but want a quick way to enter it..and y n u (auto complete) is not an option with them..
Jerry On Fri, 12 Aug 2005 16:46:02 GMT, "Ed Robichaud" <ed*********@wdn.com> wrote:
Rather than trying all those awkward work-arounds, why not use the logical (Boolean) field type that Access already has called "Yes/No". It formats/displays input as "true/false" or "yes/no" or "on/off" while storing data as 0 or -1. You can set the default to either Yes or No and use a text control, or better still, a checkbox for user input. -Ed
"sparks" <js******@swbell.net> wrote in message news:qt********************************@4ax.com. .. After trying a combo box to do this. its tied to a lookup table name value yes 1 no 0
they wanted to be able to type in a 1 but display a yes in the field. and store a 1 in the table.
so I set the combo box to bound col 2 and col widths as 1";.0093" and set the table to store it in q12 a text field. it would not allow this.
so I thought I would get clever and capture the ascii string on keyup and put that in
Select Case KeyCode Case Asc("0"): Me.q12.Value = "0" Case Asc("1"): Me.Me.q12.Value = "1"
Case Else:
End Select
well I get a 0 and it displayed a No in the field and put a 0 in the table.
good enough I though..
but on further testing it only worked that once..NOT sure why it worked at all...
how can I do this ???
I am stumped
thanks for any help
Jerry
sparks wrote: whoops sorry I keep hitting return and this news reader sends it auto they want yes-1 no-2 and missing-8 on one question and then unknown will be 9 and so on..so they hit numbers, store numbers in the table but the form displays yes or whatever they want.
Assuming it's not a continuous display form:
Use an unbound textbox for display and input.
Use a hidden, bound textbox for the field.
Use the KeyPress event of the unbound textbox to capture and translate
the users input both for display and to update the bound textbox.
Use the Form's Current event to read the hidden bound textbox and
translate it's value into string form for display in the unbound textbox.
sparks <js******@swbell.net> wrote in
news:qt********************************@4ax.com: After trying a combo box to do this. its tied to a lookup table name value yes 1 no 0
they wanted to be able to type in a 1 but display a yes in the field. and store a 1 in the table.
so I set the combo box to bound col 2 and col widths as 1";.0093" and set the table to store it in q12 a text field. it would not allow this.
There is no obvious reason why this would be the case.
First off, try not using a table, and instead using a value list:
1; Yes; 0; No
And then change the bound column to 1, and the widths to 0;1 .
Then bind the combo box to the field. It should work.
If it doesn't there has to be an error message generated, and we
can't go any further with helping you until we know what that error
message is.
--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: middletree |
last post by:
http://www.middletree.net/debug/DisplaySortableTickets.html
Doing an Intranet-based app in ASP. I put the view source version (that is,
no ASP code) out on my personal site at the above URL to...
|
by: news.hku.hk |
last post by:
suppose i have:
int price1 = 35000;
int price2 = 600;
int price3 = 8765;
int price4 = 120000;
int price5 = 3800000;
and i want to output to screen the following:
|
by: dmiller23462 |
last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript
but my end result is I need two text boxes to stay hidden until a
particular option is selected....I've cobbled together the...
|
by: Corepaul |
last post by:
As input is typed into a text box, I would like to search a recordset for the
first record that matches what has been typed so far. I would like to update
the text box to display the letters typed...
|
by: perryche |
last post by:
I have 5records, e.g. Rc1, Rc2, Rc3..., when user open up a form, I
want it to open to a particular record (say Rc3) then when user chooses
the Record Selector , it will go to Rc2 and , it will go...
|
by: Brian Blais |
last post by:
Hello,
I saw on a couple of recent posts people saying that casting the return
value of malloc is bad, like:
d=(double *) malloc(50*sizeof(double));
why is this bad? I had always thought...
|
by: Nathan Sokalski |
last post by:
When testing a form of mine which uses RequiredFieldValidators that have the
Display property set to "Dynamic" the ErrorMessage property is automatically
removed when an entry is completely typed...
|
by: Jeff |
last post by:
Help!!!
The bitmap I am trying to display in a sample Crystal Report is coming
up with much less quality than the original bitmap.
I have a 300x300 dpi bitmap file that I want to insert at run...
|
by: giandeo |
last post by:
Hello experts.
I wish to post a string and display the output in the same page.
The Scenario:
Table name: importer
Field name: imp_code, imp_sname, imp_address, imp_tel
I have a page...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |