Home Version Access

A

accessdesigner

I may be slightly off, but I am not that crazy... I am extremely grateful for
your help,.... I'm just wondering why it wont work... LUV YA!!!

tina said:
well, i don't know about anybody else, but i'm done trying to help anyone
who complains about the forum and the lack of a QUICK solution from unpaid
volunteers who have been giving up their Sunday leisure to try and figure
out what the situation is, so they can offer a working solution.


ruralguy via AccessMonster.com said:
It looks like *everyone* stopped responding at the same time. If your
NameThings is only used in a report then you will need to use a Domain
function like DLookup() to retrieve data from that query.
lol... true... but the delayed response time, and going back and forth on
things not directly related to the problem... and still trying to figure it
out while waiting for the solution.... and still not receiving the solution
QUICKLY, lol.... because logically it is supposed to work...
is quite disturbing.... just give me
your phone number lol...

Well you can't say you don't get lots of help here, right? LOL

[quoted text clipped - 13 lines]
End If
End If
 
A

accessdesigner

I will try that when I get back home.... I was trying to practice on my work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE ''*[Me.Combobox]*"

it still wont work.....

John Vinson said:
ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control, since both
tables and controls have a Name property already!

Try changing the table definition so that you're using a nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be because
one of them has Name Autocorrect set in the database's Options, and
the other doesn't. IN my experience this misfeature should be turned
OFF.

Perhaps you could post the complete SQL of the NameThings query, with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
D

Douglas J. Steele

That doesn't work because it's looking for the literal string [Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in Combobox, you need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" * Me.Combobox & "*'"

Note the inclusion of single quotes in there. Exagerated for clarity, it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " * Me.Combobox & " *
' "

If it's possible that what's in Combobox is going to include apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox & "*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " * Me.Combobox & "
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
I will try that when I get back home.... I was trying to practice on my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE ''*[Me.Combobox]*"

it still wont work.....

John Vinson said:
ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control, since both
tables and controls have a Name property already!

Try changing the table definition so that you're using a nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be because
one of them has Name Autocorrect set in the database's Options, and
the other doesn't. IN my experience this misfeature should be turned
OFF.

Perhaps you could post the complete SQL of the NameThings query, with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
A

accessdesigner

Getting closer.... at least this time it did open the form, but it was blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox & "*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely and just
opened the form.... but thats a start in the right direction, because at
first my statement locked the program and the form did not open at all...

Douglas J. Steele said:
That doesn't work because it's looking for the literal string [Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in Combobox, you need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" * Me.Combobox & "*'"

Note the inclusion of single quotes in there. Exagerated for clarity, it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " * Me.Combobox & " *
' "

If it's possible that what's in Combobox is going to include apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox & "*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " * Me.Combobox & "
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
I will try that when I get back home.... I was trying to practice on my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE ''*[Me.Combobox]*"

it still wont work.....

John Vinson said:
On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control, since both
tables and controls have a Name property already!

Try changing the table definition so that you're using a nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be because
one of them has Name Autocorrect set in the database's Options, and
the other doesn't. IN my experience this misfeature should be turned
OFF.

Perhaps you could post the complete SQL of the NameThings query, with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
D

Douglas J. Steele

Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" & Me.Combobox & "*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
Getting closer.... at least this time it did open the form, but it was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely and
just
opened the form.... but thats a start in the right direction, because at
first my statement locked the program and the form did not open at all...

Douglas J. Steele said:
That doesn't work because it's looking for the literal string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" * Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " * Me.Combobox &
" *
' "

If it's possible that what's in Combobox is going to include apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " * Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
I will try that when I get back home.... I was trying to practice on my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE ''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control, since both
tables and controls have a Name property already!

Try changing the table definition so that you're using a nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be because
one of them has Name Autocorrect set in the database's Options, and
the other doesn't. IN my experience this misfeature should be turned
OFF.

Perhaps you could post the complete SQL of the NameThings query, with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
A

accessdesigner

Even better, it pulls some data onto the form, but not all, and a column of
information from another field doesnt show up on the form like it used to
when executing that statement

accessdesigner said:
Getting closer.... at least this time it did open the form, but it was blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox & "*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely and just
opened the form.... but thats a start in the right direction, because at
first my statement locked the program and the form did not open at all...

Douglas J. Steele said:
That doesn't work because it's looking for the literal string [Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in Combobox, you need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" * Me.Combobox & "*'"

Note the inclusion of single quotes in there. Exagerated for clarity, it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " * Me.Combobox & " *
' "

If it's possible that what's in Combobox is going to include apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox & "*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " * Me.Combobox & "
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
I will try that when I get back home.... I was trying to practice on my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE ''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control, since both
tables and controls have a Name property already!

Try changing the table definition so that you're using a nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be because
one of them has Name Autocorrect set in the database's Options, and
the other doesn't. IN my experience this misfeature should be turned
OFF.

Perhaps you could post the complete SQL of the NameThings query, with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
A

accessdesigner

Something else is wrong because its not reading it correctly, it locks up
after opening the form but it is not reading new data if i enter new data
into the combo box

Douglas J. Steele said:
Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" & Me.Combobox & "*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
Getting closer.... at least this time it did open the form, but it was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely and
just
opened the form.... but thats a start in the right direction, because at
first my statement locked the program and the form did not open at all...

Douglas J. Steele said:
That doesn't work because it's looking for the literal string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" * Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " * Me.Combobox &
" *
' "

If it's possible that what's in Combobox is going to include apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " * Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
I will try that when I get back home.... I was trying to practice on my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE ''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control, since both
tables and controls have a Name property already!

Try changing the table definition so that you're using a nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be because
one of them has Name Autocorrect set in the database's Options, and
the other doesn't. IN my experience this misfeature should be turned
OFF.

Perhaps you could post the complete SQL of the NameThings query, with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
D

Douglas J. Steele

Don't understand what you mean by "reading new data". Once you've set the
criteria, it's set: changing the combo box won't be reflected unless you
select a new value from the combo box.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
Something else is wrong because its not reading it correctly, it locks up
after opening the form but it is not reading new data if i enter new data
into the combo box

Douglas J. Steele said:
Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" & Me.Combobox &
"*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Getting closer.... at least this time it did open the form, but it was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely and
just
opened the form.... but thats a start in the right direction, because
at
first my statement locked the program and the form did not open at
all...

:

That doesn't work because it's looking for the literal string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" * Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " * Me.Combobox
&
" *
' "

If it's possible that what's in Combobox is going to include
apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " *
Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
I will try that when I get back home.... I was trying to practice on
my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE ''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control, since
both
tables and controls have a Name property already!

Try changing the table definition so that you're using a
nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be
because
one of them has Name Autocorrect set in the database's Options, and
the other doesn't. IN my experience this misfeature should be
turned
OFF.

Perhaps you could post the complete SQL of the NameThings query,
with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
A

accessdesigner

exactly.... and i meant "textbox" to where i type in a value to be searched,
versus pulling from a predefined list... it wont work correctly.... every
time i retry... sometimes the form comes up blank, sometimes it has one or
two records that did include the search word, then sometimes it locks up
completely, and contain wrong records...

Douglas J. Steele said:
Don't understand what you mean by "reading new data". Once you've set the
criteria, it's set: changing the combo box won't be reflected unless you
select a new value from the combo box.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
Something else is wrong because its not reading it correctly, it locks up
after opening the form but it is not reading new data if i enter new data
into the combo box

Douglas J. Steele said:
Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" & Me.Combobox &
"*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Getting closer.... at least this time it did open the form, but it was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely and
just
opened the form.... but thats a start in the right direction, because
at
first my statement locked the program and the form did not open at
all...

:

That doesn't work because it's looking for the literal string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" * Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " * Me.Combobox
&
" *
' "

If it's possible that what's in Combobox is going to include
apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " *
Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
I will try that when I get back home.... I was trying to practice on
my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE ''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control, since
both
tables and controls have a Name property already!

Try changing the table definition so that you're using a
nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be
because
one of them has Name Autocorrect set in the database's Options, and
the other doesn't. IN my experience this misfeature should be
turned
OFF.

Perhaps you could post the complete SQL of the NameThings query,
with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
A

accessdesigner

the statement wont work as a stand alone, but it will work if i include an
additional criteria combo box with that one, ... like subject and date, but
the subject criteria wont work by itself

accessdesigner said:
exactly.... and i meant "textbox" to where i type in a value to be searched,
versus pulling from a predefined list... it wont work correctly.... every
time i retry... sometimes the form comes up blank, sometimes it has one or
two records that did include the search word, then sometimes it locks up
completely, and contain wrong records...

Douglas J. Steele said:
Don't understand what you mean by "reading new data". Once you've set the
criteria, it's set: changing the combo box won't be reflected unless you
select a new value from the combo box.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
Something else is wrong because its not reading it correctly, it locks up
after opening the form but it is not reading new data if i enter new data
into the combo box

:

Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" & Me.Combobox &
"*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Getting closer.... at least this time it did open the form, but it was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely and
just
opened the form.... but thats a start in the right direction, because
at
first my statement locked the program and the form did not open at
all...

:

That doesn't work because it's looking for the literal string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" * Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " * Me.Combobox
&
" *
' "

If it's possible that what's in Combobox is going to include
apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" * Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " *
Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
I will try that when I get back home.... I was trying to practice on
my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE ''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control, since
both
tables and controls have a Name property already!

Try changing the table definition so that you're using a
nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be
because
one of them has Name Autocorrect set in the database's Options, and
the other doesn't. IN my experience this misfeature should be
turned
OFF.

Perhaps you could post the complete SQL of the NameThings query,
with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
D

Douglas J. Steele

Show your code (making sure you indicate how it's being invoked).

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
the statement wont work as a stand alone, but it will work if i include an
additional criteria combo box with that one, ... like subject and date,
but
the subject criteria wont work by itself

accessdesigner said:
exactly.... and i meant "textbox" to where i type in a value to be
searched,
versus pulling from a predefined list... it wont work correctly.... every
time i retry... sometimes the form comes up blank, sometimes it has one
or
two records that did include the search word, then sometimes it locks up
completely, and contain wrong records...

Douglas J. Steele said:
Don't understand what you mean by "reading new data". Once you've set
the
criteria, it's set: changing the combo box won't be reflected unless
you
select a new value from the combo box.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Something else is wrong because its not reading it correctly, it
locks up
after opening the form but it is not reading new data if i enter new
data
into the combo box

:

Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" & Me.Combobox
&
"*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Getting closer.... at least this time it did open the form, but it
was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely
and
just
opened the form.... but thats a start in the right direction,
because
at
first my statement locked the program and the form did not open at
all...

:

That doesn't work because it's looking for the literal string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in
Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" *
Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for
clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " *
Me.Combobox
&
" *
' "

If it's possible that what's in Combobox is going to include
apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " *
Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


in
message
I will try that when I get back home.... I was trying to
practice on
my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE
''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the
combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control,
since
both
tables and controls have a Name property already!

Try changing the table definition so that you're using a
nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be
because
one of them has Name Autocorrect set in the database's
Options, and
the other doesn't. IN my experience this misfeature should be
turned
OFF.

Perhaps you could post the complete SQL of the NameThings
query,
with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
A

accessdesigner

when i f9 and f8 to step through the program, it wont turn yellow.....

Douglas J. Steele said:
Show your code (making sure you indicate how it's being invoked).

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
the statement wont work as a stand alone, but it will work if i include an
additional criteria combo box with that one, ... like subject and date,
but
the subject criteria wont work by itself

accessdesigner said:
exactly.... and i meant "textbox" to where i type in a value to be
searched,
versus pulling from a predefined list... it wont work correctly.... every
time i retry... sometimes the form comes up blank, sometimes it has one
or
two records that did include the search word, then sometimes it locks up
completely, and contain wrong records...

:

Don't understand what you mean by "reading new data". Once you've set
the
criteria, it's set: changing the combo box won't be reflected unless
you
select a new value from the combo box.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Something else is wrong because its not reading it correctly, it
locks up
after opening the form but it is not reading new data if i enter new
data
into the combo box

:

Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" & Me.Combobox
&
"*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Getting closer.... at least this time it did open the form, but it
was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely
and
just
opened the form.... but thats a start in the right direction,
because
at
first my statement locked the program and the form did not open at
all...

:

That doesn't work because it's looking for the literal string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in
Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" *
Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for
clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " *
Me.Combobox
&
" *
' "

If it's possible that what's in Combobox is going to include
apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " *
Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


in
message
I will try that when I get back home.... I was trying to
practice on
my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE
''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the
combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control,
since
both
tables and controls have a Name property already!

Try changing the table definition so that you're using a
nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be
because
one of them has Name Autocorrect set in the database's
Options, and
the other doesn't. IN my experience this misfeature should be
turned
OFF.

Perhaps you could post the complete SQL of the NameThings
query,
with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
A

accessdesigner

If Not IsNull(Me.optionbutton) Then
If Len(strwhere) > 0 Then
strwhere = strwhere & " And "
End If
strwhere = strwhere & "[queryobject.fieldname]LIKE ""*"
& Me.Combobox & "*"""
End If

accessdesigner said:
when i f9 and f8 to step through the program, it wont turn yellow.....

Douglas J. Steele said:
Show your code (making sure you indicate how it's being invoked).

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
the statement wont work as a stand alone, but it will work if i include an
additional criteria combo box with that one, ... like subject and date,
but
the subject criteria wont work by itself

:

exactly.... and i meant "textbox" to where i type in a value to be
searched,
versus pulling from a predefined list... it wont work correctly.... every
time i retry... sometimes the form comes up blank, sometimes it has one
or
two records that did include the search word, then sometimes it locks up
completely, and contain wrong records...

:

Don't understand what you mean by "reading new data". Once you've set
the
criteria, it's set: changing the combo box won't be reflected unless
you
select a new value from the combo box.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Something else is wrong because its not reading it correctly, it
locks up
after opening the form but it is not reading new data if i enter new
data
into the combo box

:

Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" & Me.Combobox
&
"*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Getting closer.... at least this time it did open the form, but it
was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely
and
just
opened the form.... but thats a start in the right direction,
because
at
first my statement locked the program and the form did not open at
all...

:

That doesn't work because it's looking for the literal string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in
Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" *
Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for
clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " *
Me.Combobox
&
" *
' "

If it's possible that what's in Combobox is going to include
apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " *
Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


in
message
I will try that when I get back home.... I was trying to
practice on
my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE
''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the
combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control,
since
both
tables and controls have a Name property already!

Try changing the table definition so that you're using a
nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be
because
one of them has Name Autocorrect set in the database's
Options, and
the other doesn't. IN my experience this misfeature should be
turned
OFF.

Perhaps you could post the complete SQL of the NameThings
query,
with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
A

accessdesigner

BUT its a textbox

accessdesigner said:
If Not IsNull(Me.optionbutton) Then
If Len(strwhere) > 0 Then
strwhere = strwhere & " And "
End If
strwhere = strwhere & "[queryobject.fieldname]LIKE ""*"
& Me.Combobox & "*"""
End If

accessdesigner said:
when i f9 and f8 to step through the program, it wont turn yellow.....

Douglas J. Steele said:
Show your code (making sure you indicate how it's being invoked).

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


the statement wont work as a stand alone, but it will work if i include an
additional criteria combo box with that one, ... like subject and date,
but
the subject criteria wont work by itself

:

exactly.... and i meant "textbox" to where i type in a value to be
searched,
versus pulling from a predefined list... it wont work correctly.... every
time i retry... sometimes the form comes up blank, sometimes it has one
or
two records that did include the search word, then sometimes it locks up
completely, and contain wrong records...

:

Don't understand what you mean by "reading new data". Once you've set
the
criteria, it's set: changing the combo box won't be reflected unless
you
select a new value from the combo box.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Something else is wrong because its not reading it correctly, it
locks up
after opening the form but it is not reading new data if i enter new
data
into the combo box

:

Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" & Me.Combobox
&
"*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
Getting closer.... at least this time it did open the form, but it
was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement completely
and
just
opened the form.... but thats a start in the right direction,
because
at
first my statement locked the program and the form did not open at
all...

:

That doesn't work because it's looking for the literal string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in
Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" *
Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for
clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " *
Me.Combobox
&
" *
' "

If it's possible that what's in Combobox is going to include
apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " *
Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


in
message
I will try that when I get back home.... I was trying to
practice on
my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE
''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the
combobox

The Query: NameThings .....is only connected to my Report

The word Name is a bad Name to Name a field or a control,
since
both
tables and controls have a Name property already!

Try changing the table definition so that you're using a
nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT* be
because
one of them has Name Autocorrect set in the database's
Options, and
the other doesn't. IN my experience this misfeature should be
turned
OFF.

Perhaps you could post the complete SQL of the NameThings
query,
with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
D

Douglas J. Steele

You know, getting information from you is difficult!

You've been working on this build-your-criteria for days. I doubt any of us
have any idea what your code looks like at present. Show it all: you're
saying you need to include a second criteria for it to work, but you're not
showing us enough to figure out why.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
If Not IsNull(Me.optionbutton) Then
If Len(strwhere) > 0 Then
strwhere = strwhere & " And "
End If
strwhere = strwhere & "[queryobject.fieldname]LIKE ""*"
& Me.Combobox & "*"""
End If

accessdesigner said:
when i f9 and f8 to step through the program, it wont turn yellow.....

Douglas J. Steele said:
Show your code (making sure you indicate how it's being invoked).

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
the statement wont work as a stand alone, but it will work if i
include an
additional criteria combo box with that one, ... like subject and
date,
but
the subject criteria wont work by itself

:

exactly.... and i meant "textbox" to where i type in a value to be
searched,
versus pulling from a predefined list... it wont work correctly....
every
time i retry... sometimes the form comes up blank, sometimes it has
one
or
two records that did include the search word, then sometimes it
locks up
completely, and contain wrong records...

:

Don't understand what you mean by "reading new data". Once you've
set
the
criteria, it's set: changing the combo box won't be reflected
unless
you
select a new value from the combo box.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


in
message
Something else is wrong because its not reading it correctly, it
locks up
after opening the form but it is not reading new data if i enter
new
data
into the combo box

:

Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" &
Me.Combobox
&
"*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


"accessdesigner" <[email protected]>
wrote in
message
Getting closer.... at least this time it did open the form,
but it
was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement
completely
and
just
opened the form.... but thats a start in the right direction,
because
at
first my statement locked the program and the form did not
open at
all...

:

That doesn't work because it's looking for the literal
string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in
Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" *
Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for
clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " *
Me.Combobox
&
" *
' "

If it's possible that what's in Combobox is going to include
apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " *
Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


"accessdesigner" <[email protected]>
wrote
in
message
I will try that when I get back home.... I was trying to
practice on
my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE
''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the
combobox

The Query: NameThings .....is only connected to my
Report

The word Name is a bad Name to Name a field or a control,
since
both
tables and controls have a Name property already!

Try changing the table definition so that you're using a
nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT*
be
because
one of them has Name Autocorrect set in the database's
Options, and
the other doesn't. IN my experience this misfeature
should be
turned
OFF.

Perhaps you could post the complete SQL of the NameThings
query,
with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
A

accessdesigner

I understand how you feel, because I feel the same way, when I think I gave
enough information towards asking for help, yet after 35 strings, people keep
saying "what are you talking about?".... this is a good service, but I wish
it came through instant messaging... because I do not know what you mean when
you say show your code; what code?

Douglas J. Steele said:
You know, getting information from you is difficult!

You've been working on this build-your-criteria for days. I doubt any of us
have any idea what your code looks like at present. Show it all: you're
saying you need to include a second criteria for it to work, but you're not
showing us enough to figure out why.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


accessdesigner said:
If Not IsNull(Me.optionbutton) Then
If Len(strwhere) > 0 Then
strwhere = strwhere & " And "
End If
strwhere = strwhere & "[queryobject.fieldname]LIKE ""*"
& Me.Combobox & "*"""
End If

accessdesigner said:
when i f9 and f8 to step through the program, it wont turn yellow.....

:

Show your code (making sure you indicate how it's being invoked).

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
the statement wont work as a stand alone, but it will work if i
include an
additional criteria combo box with that one, ... like subject and
date,
but
the subject criteria wont work by itself

:

exactly.... and i meant "textbox" to where i type in a value to be
searched,
versus pulling from a predefined list... it wont work correctly....
every
time i retry... sometimes the form comes up blank, sometimes it has
one
or
two records that did include the search word, then sometimes it
locks up
completely, and contain wrong records...

:

Don't understand what you mean by "reading new data". Once you've
set
the
criteria, it's set: changing the combo box won't be reflected
unless
you
select a new value from the combo box.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


in
message
Something else is wrong because its not reading it correctly, it
locks up
after opening the form but it is not reading new data if i enter
new
data
into the combo box

:

Sorry, my typo.

strwhere = strwhere & "[queryobject.subject] LIKE ""*" &
Me.Combobox
&
"*"""


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


"accessdesigner" <[email protected]>
wrote in
message
Getting closer.... at least this time it did open the form,
but it
was
blank...

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

i replaced *Me.Combobox with ... &Me.Combobox

but it did not read any data, it bypassed the statement
completely
and
just
opened the form.... but thats a start in the right direction,
because
at
first my statement locked the program and the form did not
open at
all...

:

That doesn't work because it's looking for the literal
string
[Me.Combobox]
anywhere in your subject field.

Assuming you want the value that's currently selected in
Combobox, you
need
to use:

strwhere = strwhere & "[queryobject.subject] LIKE '*" *
Me.Combobox &
"*'"

Note the inclusion of single quotes in there. Exagerated for
clarity,
it's

strwhere = strwhere & "[queryobject.subject] LIKE ' * " *
Me.Combobox
&
" *
' "

If it's possible that what's in Combobox is going to include
apostrophes,
use the following instead:

strwhere = strwhere & "[queryobject.subject] LIKE ""*" *
Me.Combobox &
"*"""

That's

strwhere = strwhere & "[queryobject.subject] LIKE " " * " *
Me.Combobox &
"
* " " "

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


"accessdesigner" <[email protected]>
wrote
in
message
I will try that when I get back home.... I was trying to
practice on
my
work
version, which still doesnt work:

strwhere = strwhere & "[queryobject.subject]LIKE
''*[Me.Combobox]*"

it still wont work.....

:

On Sun, 26 Nov 2006 09:31:02 -0800, accessdesigner

ty... ( need you all on speed dial.... lol)

my combobox is connected to :
SELECT Names.Name FROM [Names] ORDER BY [Name];
(thats a table where my list names scroll down from the
combobox

The Query: NameThings .....is only connected to my
Report

The word Name is a bad Name to Name a field or a control,
since
both
tables and controls have a Name property already!

Try changing the table definition so that you're using a
nonreserved
term in place of Name - or at the very least bracket it.

The difference between the home and work versions *MIGHT*
be
because
one of them has Name Autocorrect set in the database's
Options, and
the other doesn't. IN my experience this misfeature
should be
turned
OFF.

Perhaps you could post the complete SQL of the NameThings
query,
with
some indication of the datatypes of the table fields.

John W. Vinson[MVP]
 
D

David W. Fenton

I understand how you feel, because I feel the same way, when I
think I gave enough information towards asking for help, yet after
35 strings, people keep saying "what are you talking about?"

I have read the whole thread, but don't have a clue where you are
doing this or what you are trying to accomplish. I don't know what
events are running the code you've posted or what the hell you want
to do in the first place.

You haven't explained yourself well at all.

You haven't answered the questions that have been asked.

You haven't provided the code that has been requested.

And you wonder why people can't help you.
 
A

aprialos

I apologize for jumping into the middle of this discussion. I am lookinng to
find out if I can purchase just access alone? I have student home and office
2007. Acces is the only program I need to get. And if I can, does any one
know where? I cannot fint it by itself on the MS website.

tina said:
you can't return a value from a query that way, unless the query is bound to
the form that the code is running from (in which case, all you'd need is the
field reference, as ruralguy pointed out).

if the query NameThings only returns one record, then you can retrieve the
value of the NameLOOK field with a DLookup() function as described by Doug
Steele, and assign it to Me.NameList; otherwise, you're going to need to
apply criteria in the DLookup() to retrieve the appropriate record from the
query.

hth


accessdesigner said:
It's a query, and field name,... i was surprised too that i didnt work,
because it worked at work....

Douglas J. Steele said:
I'm surprised it recognizes that in any version.

What is NameThings?

If it's an open form, that should be Forms![NameThings]![NameLOOK]

If it's a table, you need to use a DLookup: DLookup("[NameLOOK]",
"[NameThings]")

If it's a recordset, you need to use NameThings!NameLOOK


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I purchased a home version of Access from Microsoft through my job, and
when
I tried the following statement using the home version of Access, it wont
recognize [NameThings.NameLOOK] as being correct, but it works at work:
(why?)

Dim strwhere As String
strwhere = ""
If Not IsNull(Me.NameList) Then
If Me.NameList = [NameThings.NameLOOK] Then
strwhere = strwhere & Me.NameList
End If
End If
 
T

Tom Brown

MS Access 2007 can be purchased as a stand alone program. Go to Amazon.com
and search for Microsoft Access 2007. You should see in the list a full
version and an upgrade version for sale.


I apologize for jumping into the middle of this discussion. I am lookinng
to
find out if I can purchase just access alone? I have student home and
office
2007. Acces is the only program I need to get. And if I can, does any one
know where? I cannot fint it by itself on the MS website.

tina said:
you can't return a value from a query that way, unless the query is bound
to
the form that the code is running from (in which case, all you'd need is
the
field reference, as ruralguy pointed out).

if the query NameThings only returns one record, then you can retrieve
the
value of the NameLOOK field with a DLookup() function as described by
Doug
Steele, and assign it to Me.NameList; otherwise, you're going to need to
apply criteria in the DLookup() to retrieve the appropriate record from
the
query.

hth


message
It's a query, and field name,... i was surprised too that i didnt work,
because it worked at work....

:

I'm surprised it recognizes that in any version.

What is NameThings?

If it's an open form, that should be Forms![NameThings]![NameLOOK]

If it's a table, you need to use a DLookup: DLookup("[NameLOOK]",
"[NameThings]")

If it's a recordset, you need to use NameThings!NameLOOK


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


I purchased a home version of Access from Microsoft through my job,
and
when
I tried the following statement using the home version of Access,
it wont
recognize [NameThings.NameLOOK] as being correct, but it works at work:
(why?)

Dim strwhere As String
strwhere = ""
If Not IsNull(Me.NameList) Then
If Me.NameList = [NameThings.NameLOOK] Then
strwhere = strwhere & Me.NameList
End If
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top