473,386 Members | 1,796 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,386 software developers and data experts.

value on a form not being used

Hi All,

In AccessXP I have a form, the user selects stuff and in a hidden
unbound textbox(bxOfcCde) I create an 'In' statement like
In('1f','mf')

then on the click event of a button I run a query which uses the
string above as criteria in the Ofc_Cde field with a usual reference
on the criteria line like [Forms]![frmMainMenu]![bxOfcCde]

but it's not working, the query returns 0 records yet if I type the
same string In('1f','mf') in the criteria of Ofc_Cde directly and
run the query I get records.

What am I missing??

thanks
bobh.

Oct 26 '07 #1
2 1119
On Oct 26, 2:51 pm, bobh <vulca...@yahoo.comwrote:
In AccessXP I have a form, the user selects stuff and in a hidden
unbound textbox(bxOfcCde) I create an 'In' statement like
In('1f','mf')

then on the click event of a button I run a query which uses the
string above as criteria in the Ofc_Cde field with a usual reference
on the criteria line like [Forms]![frmMainMenu]![bxOfcCde]

but it's not working, the query returns 0 records yet if I type the
same string In('1f','mf') in the criteria of Ofc_Cde directly and
run the query I get records.
Perhaps a Me.Refresh AfterUpdate might help.

Oct 26 '07 #2
bobh wrote:
Hi All,

In AccessXP I have a form, the user selects stuff and in a hidden
unbound textbox(bxOfcCde) I create an 'In' statement like
In('1f','mf')

then on the click event of a button I run a query which uses the
string above as criteria in the Ofc_Cde field with a usual reference
on the criteria line like [Forms]![frmMainMenu]![bxOfcCde]

but it's not working, the query returns 0 records yet if I type the
same string In('1f','mf') in the criteria of Ofc_Cde directly and
run the query I get records.

What am I missing??

thanks
bobh.
I don't know. I tried various methods myself. I could come up one that
works like this
Me.bxOfcCde = ",1f,mf,"
Then in the criteria
Instr([frmMainMenu]![bxOfcCde],"," & [Ofc_Cde] & ",") 0
Oct 27 '07 #3

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

Similar topics

3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
5
by: Derek Cooper | last post by:
I hope you can help me. I posted this in the microsoft sql server newsgroup a few days ago and got no response so I thought I'd try here. If I can provide any clarification I'll be glad to do so....
4
by: Randell D. | last post by:
Folks, I have a form (called FORM1) - In my INPUT submit tag, I have an onClick event that I have successfully tested/used to display the value of a TEXT box using the following function (called...
16
by: cwizard | last post by:
I'm calling on a function from within this form, and there are values set but every time it gets called I get slammed with a run time error... document.frmKitAmount.txtTotalKitValue is null or not...
6
by: AC | last post by:
This code works great the first few times it is used in a form and then I get the error: 'QUANTITY.value' is null or not an object in IE6. The names used are generated on the server so it is not...
2
by: Matt | last post by:
If I do the following, the browse text box still cannot see C:/hello world/test.txt. <input type="file" name="fileName" value="C:/hello world/test.txt" size=80> Any ideas? and workarounds...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
12
by: Mark Kurten | last post by:
i have the code below: for starters the value of txtempid = 1 after i go through this routine (i put a break point on the txtname.value line), the value of txtEmpID is 2 (Just like it is...
3
by: newjazzharmony | last post by:
Hello group, I want to automatically select a specific checkbox when a user clicks (selects) a specific item in a radiobutton group. Both controls are in the same form. Let's say for...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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,...

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.