Database Code

G

Guest

I need some help with several problems --
1. When i'm importing records through a query, using an append table, its
telling me its found several errors in all the records, because of a
validation rule. Tehre are no validation rules set, and ther are no
formatting issues. At any rate, if i override it and allow it to import the
data, it works fine. Id like to remove this problem, as the people who wil
be using this database are not technical at all.

2. I've tried several different code snippets on the web and from MS's
different affiliates, with no luck. I'm trying to make a very simple filter
so that by selecting one of the (NON duplicates) on the list box, all of the
records are filtered to show only those with the same value as the list box.

3. Exporting data onto a web form.. . this one needs lots of help. I have
not yet built the form, but I intend to have it served from a secure server
from my workplace. My options are, what is currently done, whihc is
exporting the results to a spreadsheet and emailing it to everyone, and what
i want to do, whihc is create a webpage they can look at online, with no user
permissions except to read the records, using the same sorting method as
above.
4. In one of my Yes/No fields, it defaults to a value of 0, even though i
have none of the default values set. When i went back and changed all the
defaults to "No", it still insists on placing a zero if one clicks on a Null
field, in order to enter "yes" or "no"


I imagine someone will want a copy of some part of my database. I can
provide that, but as the records are secure, i wil have to clear them out.
 
G

Guest

1) What is probably happening is one of your fields has the "Required" option
set to true. Any records which have no value for that field will return a
validation error. It's very possible it's not working correctly, as it will
reject those records and you could be losing data you need. You can block
this error message by running the queries in a macro or VB code and setting
setwarnings to false... although making it handle your data more reliably
would be a better choice, if possible.

2) Use a combo box, and try code similar to this:

Private Sub Combo10_Click()
Me.Filter = "[Field1] = '" & Me.Combo10.Text & "'"
Me.FilterOn = True
End Sub

3. Can't help you much here.

4. 0 = No = False. Defaulting it to no will set the value to 0. Having no
default value set.. will default it to no, which defaults it to 0.
 
G

Guest

Yes, in fact there are four required fields. The data the appendtable is
providing includes those fields, and none of them are empty, nor do they
break any of those rules.


Lance said:
1) What is probably happening is one of your fields has the "Required" option
set to true. Any records which have no value for that field will return a
validation error. It's very possible it's not working correctly, as it will
reject those records and you could be losing data you need. You can block
this error message by running the queries in a macro or VB code and setting
setwarnings to false... although making it handle your data more reliably
would be a better choice, if possible.

2) Use a combo box, and try code similar to this:

Private Sub Combo10_Click()
Me.Filter = "[Field1] = '" & Me.Combo10.Text & "'"
Me.FilterOn = True
End Sub

3. Can't help you much here.

4. 0 = No = False. Defaulting it to no will set the value to 0. Having no
default value set.. will default it to no, which defaults it to 0.


Pwyd said:
I need some help with several problems --
1. When i'm importing records through a query, using an append table, its
telling me its found several errors in all the records, because of a
validation rule. Tehre are no validation rules set, and ther are no
formatting issues. At any rate, if i override it and allow it to import the
data, it works fine. Id like to remove this problem, as the people who wil
be using this database are not technical at all.

2. I've tried several different code snippets on the web and from MS's
different affiliates, with no luck. I'm trying to make a very simple filter
so that by selecting one of the (NON duplicates) on the list box, all of the
records are filtered to show only those with the same value as the list box.

3. Exporting data onto a web form.. . this one needs lots of help. I have
not yet built the form, but I intend to have it served from a secure server
from my workplace. My options are, what is currently done, whihc is
exporting the results to a spreadsheet and emailing it to everyone, and what
i want to do, whihc is create a webpage they can look at online, with no user
permissions except to read the records, using the same sorting method as
above.
4. In one of my Yes/No fields, it defaults to a value of 0, even though i
have none of the default values set. When i went back and changed all the
defaults to "No", it still insists on placing a zero if one clicks on a Null
field, in order to enter "yes" or "no"


I imagine someone will want a copy of some part of my database. I can
provide that, but as the records are secure, i wil have to clear them out.
 
G

Guest

Well.. along the same line. Do you have any fields with "allow zero length"
set to no and data which violates it?

Pwyd said:
Yes, in fact there are four required fields. The data the appendtable is
providing includes those fields, and none of them are empty, nor do they
break any of those rules.


Lance said:
1) What is probably happening is one of your fields has the "Required" option
set to true. Any records which have no value for that field will return a
validation error. It's very possible it's not working correctly, as it will
reject those records and you could be losing data you need. You can block
this error message by running the queries in a macro or VB code and setting
setwarnings to false... although making it handle your data more reliably
would be a better choice, if possible.

2) Use a combo box, and try code similar to this:

Private Sub Combo10_Click()
Me.Filter = "[Field1] = '" & Me.Combo10.Text & "'"
Me.FilterOn = True
End Sub

3. Can't help you much here.

4. 0 = No = False. Defaulting it to no will set the value to 0. Having no
default value set.. will default it to no, which defaults it to 0.


Pwyd said:
I need some help with several problems --
1. When i'm importing records through a query, using an append table, its
telling me its found several errors in all the records, because of a
validation rule. Tehre are no validation rules set, and ther are no
formatting issues. At any rate, if i override it and allow it to import the
data, it works fine. Id like to remove this problem, as the people who wil
be using this database are not technical at all.

2. I've tried several different code snippets on the web and from MS's
different affiliates, with no luck. I'm trying to make a very simple filter
so that by selecting one of the (NON duplicates) on the list box, all of the
records are filtered to show only those with the same value as the list box.

3. Exporting data onto a web form.. . this one needs lots of help. I have
not yet built the form, but I intend to have it served from a secure server
from my workplace. My options are, what is currently done, whihc is
exporting the results to a spreadsheet and emailing it to everyone, and what
i want to do, whihc is create a webpage they can look at online, with no user
permissions except to read the records, using the same sorting method as
above.
4. In one of my Yes/No fields, it defaults to a value of 0, even though i
have none of the default values set. When i went back and changed all the
defaults to "No", it still insists on placing a zero if one clicks on a Null
field, in order to enter "yes" or "no"


I imagine someone will want a copy of some part of my database. I can
provide that, but as the records are secure, i wil have to clear them out.
 
G

Guest

All right. now i'm getting an error for a Data type criteria mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text & "'"
Me.FilterOn = True


where sap company code is the name of the field i wish to display the values
that one has an option to filter by
and the saplistboxcontrol is the name of the list box itself.
I need it to only show one of each value that exists in that field. No
duplicates.
I also need it to actually do the filtering. it shows a filter being on when
looking at the record controls, but its moving through all the records, not
just the ones its filtered.


I'm unsure how to proceed with making the data transfer on the append table
work properly. I don't see why those required fields are causing trouble at
all. Could i simply supply you with a copy of the database and have you look
yourself? Perhaps i'm just poor at describing my problems here.

Pwyd said:
Yes, in fact there are four required fields. The data the appendtable is
providing includes those fields, and none of them are empty, nor do they
break any of those rules.


Lance said:
1) What is probably happening is one of your fields has the "Required" option
set to true. Any records which have no value for that field will return a
validation error. It's very possible it's not working correctly, as it will
reject those records and you could be losing data you need. You can block
this error message by running the queries in a macro or VB code and setting
setwarnings to false... although making it handle your data more reliably
would be a better choice, if possible.

2) Use a combo box, and try code similar to this:

Private Sub Combo10_Click()
Me.Filter = "[Field1] = '" & Me.Combo10.Text & "'"
Me.FilterOn = True
End Sub

3. Can't help you much here.

4. 0 = No = False. Defaulting it to no will set the value to 0. Having no
default value set.. will default it to no, which defaults it to 0.


Pwyd said:
I need some help with several problems --
1. When i'm importing records through a query, using an append table, its
telling me its found several errors in all the records, because of a
validation rule. Tehre are no validation rules set, and ther are no
formatting issues. At any rate, if i override it and allow it to import the
data, it works fine. Id like to remove this problem, as the people who wil
be using this database are not technical at all.

2. I've tried several different code snippets on the web and from MS's
different affiliates, with no luck. I'm trying to make a very simple filter
so that by selecting one of the (NON duplicates) on the list box, all of the
records are filtered to show only those with the same value as the list box.

3. Exporting data onto a web form.. . this one needs lots of help. I have
not yet built the form, but I intend to have it served from a secure server
from my workplace. My options are, what is currently done, whihc is
exporting the results to a spreadsheet and emailing it to everyone, and what
i want to do, whihc is create a webpage they can look at online, with no user
permissions except to read the records, using the same sorting method as
above.
4. In one of my Yes/No fields, it defaults to a value of 0, even though i
have none of the default values set. When i went back and changed all the
defaults to "No", it still insists on placing a zero if one clicks on a Null
field, in order to enter "yes" or "no"


I imagine someone will want a copy of some part of my database. I can
provide that, but as the records are secure, i wil have to clear them out.
 
G

Guest

is [Sap Company Code] a numeric field?

Pwyd said:
All right. now i'm getting an error for a Data type criteria mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text & "'"
Me.FilterOn = True


where sap company code is the name of the field i wish to display the values
that one has an option to filter by
and the saplistboxcontrol is the name of the list box itself.
I need it to only show one of each value that exists in that field. No
duplicates.
I also need it to actually do the filtering. it shows a filter being on when
looking at the record controls, but its moving through all the records, not
just the ones its filtered.


I'm unsure how to proceed with making the data transfer on the append table
work properly. I don't see why those required fields are causing trouble at
all. Could i simply supply you with a copy of the database and have you look
yourself? Perhaps i'm just poor at describing my problems here.

Pwyd said:
Yes, in fact there are four required fields. The data the appendtable is
providing includes those fields, and none of them are empty, nor do they
break any of those rules.


Lance said:
1) What is probably happening is one of your fields has the "Required" option
set to true. Any records which have no value for that field will return a
validation error. It's very possible it's not working correctly, as it will
reject those records and you could be losing data you need. You can block
this error message by running the queries in a macro or VB code and setting
setwarnings to false... although making it handle your data more reliably
would be a better choice, if possible.

2) Use a combo box, and try code similar to this:

Private Sub Combo10_Click()
Me.Filter = "[Field1] = '" & Me.Combo10.Text & "'"
Me.FilterOn = True
End Sub

3. Can't help you much here.

4. 0 = No = False. Defaulting it to no will set the value to 0. Having no
default value set.. will default it to no, which defaults it to 0.


:

I need some help with several problems --
1. When i'm importing records through a query, using an append table, its
telling me its found several errors in all the records, because of a
validation rule. Tehre are no validation rules set, and ther are no
formatting issues. At any rate, if i override it and allow it to import the
data, it works fine. Id like to remove this problem, as the people who wil
be using this database are not technical at all.

2. I've tried several different code snippets on the web and from MS's
different affiliates, with no luck. I'm trying to make a very simple filter
so that by selecting one of the (NON duplicates) on the list box, all of the
records are filtered to show only those with the same value as the list box.

3. Exporting data onto a web form.. . this one needs lots of help. I have
not yet built the form, but I intend to have it served from a secure server
from my workplace. My options are, what is currently done, whihc is
exporting the results to a spreadsheet and emailing it to everyone, and what
i want to do, whihc is create a webpage they can look at online, with no user
permissions except to read the records, using the same sorting method as
above.
4. In one of my Yes/No fields, it defaults to a value of 0, even though i
have none of the default values set. When i went back and changed all the
defaults to "No", it still insists on placing a zero if one clicks on a Null
field, in order to enter "yes" or "no"


I imagine someone will want a copy of some part of my database. I can
provide that, but as the records are secure, i wil have to clear them out.
 
G

Guest

Gimme an email address, i'll send you a copy of it. There are no fields that
allow zero length that violate the data that is being given to it. The only
fields being appended have data in them. the rest of them aren't being
touched.


Lance said:
Well.. along the same line. Do you have any fields with "allow zero length"
set to no and data which violates it?

Pwyd said:
Yes, in fact there are four required fields. The data the appendtable is
providing includes those fields, and none of them are empty, nor do they
break any of those rules.


Lance said:
1) What is probably happening is one of your fields has the "Required" option
set to true. Any records which have no value for that field will return a
validation error. It's very possible it's not working correctly, as it will
reject those records and you could be losing data you need. You can block
this error message by running the queries in a macro or VB code and setting
setwarnings to false... although making it handle your data more reliably
would be a better choice, if possible.

2) Use a combo box, and try code similar to this:

Private Sub Combo10_Click()
Me.Filter = "[Field1] = '" & Me.Combo10.Text & "'"
Me.FilterOn = True
End Sub

3. Can't help you much here.

4. 0 = No = False. Defaulting it to no will set the value to 0. Having no
default value set.. will default it to no, which defaults it to 0.


:

I need some help with several problems --
1. When i'm importing records through a query, using an append table, its
telling me its found several errors in all the records, because of a
validation rule. Tehre are no validation rules set, and ther are no
formatting issues. At any rate, if i override it and allow it to import the
data, it works fine. Id like to remove this problem, as the people who wil
be using this database are not technical at all.

2. I've tried several different code snippets on the web and from MS's
different affiliates, with no luck. I'm trying to make a very simple filter
so that by selecting one of the (NON duplicates) on the list box, all of the
records are filtered to show only those with the same value as the list box.

3. Exporting data onto a web form.. . this one needs lots of help. I have
not yet built the form, but I intend to have it served from a secure server
from my workplace. My options are, what is currently done, whihc is
exporting the results to a spreadsheet and emailing it to everyone, and what
i want to do, whihc is create a webpage they can look at online, with no user
permissions except to read the records, using the same sorting method as
above.
4. In one of my Yes/No fields, it defaults to a value of 0, even though i
have none of the default values set. When i went back and changed all the
defaults to "No", it still insists on placing a zero if one clicks on a Null
field, in order to enter "yes" or "no"


I imagine someone will want a copy of some part of my database. I can
provide that, but as the records are secure, i wil have to clear them out.
 
G

Guest

yes, its numeric. why should that matter?


Lance said:
is [Sap Company Code] a numeric field?

Pwyd said:
All right. now i'm getting an error for a Data type criteria mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text & "'"
Me.FilterOn = True


where sap company code is the name of the field i wish to display the values
that one has an option to filter by
and the saplistboxcontrol is the name of the list box itself.
I need it to only show one of each value that exists in that field. No
duplicates.
I also need it to actually do the filtering. it shows a filter being on when
looking at the record controls, but its moving through all the records, not
just the ones its filtered.


I'm unsure how to proceed with making the data transfer on the append table
work properly. I don't see why those required fields are causing trouble at
all. Could i simply supply you with a copy of the database and have you look
yourself? Perhaps i'm just poor at describing my problems here.

Pwyd said:
Yes, in fact there are four required fields. The data the appendtable is
providing includes those fields, and none of them are empty, nor do they
break any of those rules.


:

1) What is probably happening is one of your fields has the "Required" option
set to true. Any records which have no value for that field will return a
validation error. It's very possible it's not working correctly, as it will
reject those records and you could be losing data you need. You can block
this error message by running the queries in a macro or VB code and setting
setwarnings to false... although making it handle your data more reliably
would be a better choice, if possible.

2) Use a combo box, and try code similar to this:

Private Sub Combo10_Click()
Me.Filter = "[Field1] = '" & Me.Combo10.Text & "'"
Me.FilterOn = True
End Sub

3. Can't help you much here.

4. 0 = No = False. Defaulting it to no will set the value to 0. Having no
default value set.. will default it to no, which defaults it to 0.


:

I need some help with several problems --
1. When i'm importing records through a query, using an append table, its
telling me its found several errors in all the records, because of a
validation rule. Tehre are no validation rules set, and ther are no
formatting issues. At any rate, if i override it and allow it to import the
data, it works fine. Id like to remove this problem, as the people who wil
be using this database are not technical at all.

2. I've tried several different code snippets on the web and from MS's
different affiliates, with no luck. I'm trying to make a very simple filter
so that by selecting one of the (NON duplicates) on the list box, all of the
records are filtered to show only those with the same value as the list box.

3. Exporting data onto a web form.. . this one needs lots of help. I have
not yet built the form, but I intend to have it served from a secure server
from my workplace. My options are, what is currently done, whihc is
exporting the results to a spreadsheet and emailing it to everyone, and what
i want to do, whihc is create a webpage they can look at online, with no user
permissions except to read the records, using the same sorting method as
above.
4. In one of my Yes/No fields, it defaults to a value of 0, even though i
have none of the default values set. When i went back and changed all the
defaults to "No", it still insists on placing a zero if one clicks on a Null
field, in order to enter "yes" or "no"


I imagine someone will want a copy of some part of my database. I can
provide that, but as the records are secure, i wil have to clear them out.
 
G

Guest

I'm afraid I wouldn't be allowed to open it, against company security rules.

And silly question.. but when you say "the only fields being appended" do
you mean the fields that actually make it into your final table, or all the
fields in the initial table you're trying to add?

Pwyd said:
Gimme an email address, i'll send you a copy of it. There are no fields that
allow zero length that violate the data that is being given to it. The only
fields being appended have data in them. the rest of them aren't being
touched.


Lance said:
Well.. along the same line. Do you have any fields with "allow zero length"
set to no and data which violates it?

Pwyd said:
Yes, in fact there are four required fields. The data the appendtable is
providing includes those fields, and none of them are empty, nor do they
break any of those rules.


:

1) What is probably happening is one of your fields has the "Required" option
set to true. Any records which have no value for that field will return a
validation error. It's very possible it's not working correctly, as it will
reject those records and you could be losing data you need. You can block
this error message by running the queries in a macro or VB code and setting
setwarnings to false... although making it handle your data more reliably
would be a better choice, if possible.

2) Use a combo box, and try code similar to this:

Private Sub Combo10_Click()
Me.Filter = "[Field1] = '" & Me.Combo10.Text & "'"
Me.FilterOn = True
End Sub

3. Can't help you much here.

4. 0 = No = False. Defaulting it to no will set the value to 0. Having no
default value set.. will default it to no, which defaults it to 0.


:

I need some help with several problems --
1. When i'm importing records through a query, using an append table, its
telling me its found several errors in all the records, because of a
validation rule. Tehre are no validation rules set, and ther are no
formatting issues. At any rate, if i override it and allow it to import the
data, it works fine. Id like to remove this problem, as the people who wil
be using this database are not technical at all.

2. I've tried several different code snippets on the web and from MS's
different affiliates, with no luck. I'm trying to make a very simple filter
so that by selecting one of the (NON duplicates) on the list box, all of the
records are filtered to show only those with the same value as the list box.

3. Exporting data onto a web form.. . this one needs lots of help. I have
not yet built the form, but I intend to have it served from a secure server
from my workplace. My options are, what is currently done, whihc is
exporting the results to a spreadsheet and emailing it to everyone, and what
i want to do, whihc is create a webpage they can look at online, with no user
permissions except to read the records, using the same sorting method as
above.
4. In one of my Yes/No fields, it defaults to a value of 0, even though i
have none of the default values set. When i went back and changed all the
defaults to "No", it still insists on placing a zero if one clicks on a Null
field, in order to enter "yes" or "no"


I imagine someone will want a copy of some part of my database. I can
provide that, but as the records are secure, i wil have to clear them out.
 
G

Guest

You get data type criteria mismatch errors when you're trying to compare two
values with different data types, in this case the numeric [Sap Company Code]
field with a string from your textbox. We were actually forcing the result
to string by putting it in quotes.. easy enough to fix. Try:

Me.Filter = "[Sap Company Code] = " & Me.saplistboxcontrol.Text

Pwyd said:
yes, its numeric. why should that matter?


Lance said:
is [Sap Company Code] a numeric field?

Pwyd said:
All right. now i'm getting an error for a Data type criteria mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text & "'"
Me.FilterOn = True
 
G

Guest

All right, so now its filtering. That leaves a second problem, how to
remove duplicates. I had found a snippet on the web that involved comparing
the list to itself unless it was null, and so on. When i tried it though, i
must have improperly referred to some of the expressions. I took access
database zillions of years ago. Honestly, the data i can find online or in
the help files provided elsewhere by Microsoft as completely useless. It
will simply tell you what the autocomplete already tells you. that it
requires such and such an expresion and so on. unfortunately, it never
mentions what this expression should be constructed of, or any special syntax
involved. Useless.

For me, more importantly, will be properly importing the data.
I was told that directly importing it into a table was a very bad idea, and
could cause all sorts of problems (it did).
so i created a second table, using only the fields that the data to be
imported uses, and built them to be the same named fields as in my main table
for the form. The people who will be using this form are required, when
editing or creating records, to make certain that at least the four required
fields are filled. You are stating this may be the problem. What can i do
to these fields that will prevent access from floating all these warnings and
error messages to me, when in fact none are occurring (it all imports
properly).

Finally, after the data is importd into the append table, the query won't
run. It claims i do not possess the active x control license in order to use
dmcmd.Query [query name].
so i have to do it manually. Again, for non astute or technical people,
this will be a problem. I want them to have to click buttons, not learn
access database.


Lance said:
You get data type criteria mismatch errors when you're trying to compare two
values with different data types, in this case the numeric [Sap Company Code]
field with a string from your textbox. We were actually forcing the result
to string by putting it in quotes.. easy enough to fix. Try:

Me.Filter = "[Sap Company Code] = " & Me.saplistboxcontrol.Text

Pwyd said:
yes, its numeric. why should that matter?


Lance said:
is [Sap Company Code] a numeric field?

:

All right. now i'm getting an error for a Data type criteria mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text & "'"
Me.FilterOn = True
 
G

Guest

Mind you, i'm tryign to remove the duplicates from the LIST. not from the
records that are filtered. if two records have the same SAp Company code, i
only want the number to show up once in the listbox control.

Pwyd said:
All right, so now its filtering. That leaves a second problem, how to
remove duplicates. I had found a snippet on the web that involved comparing
the list to itself unless it was null, and so on. When i tried it though, i
must have improperly referred to some of the expressions. I took access
database zillions of years ago. Honestly, the data i can find online or in
the help files provided elsewhere by Microsoft as completely useless. It
will simply tell you what the autocomplete already tells you. that it
requires such and such an expresion and so on. unfortunately, it never
mentions what this expression should be constructed of, or any special syntax
involved. Useless.

For me, more importantly, will be properly importing the data.
I was told that directly importing it into a table was a very bad idea, and
could cause all sorts of problems (it did).
so i created a second table, using only the fields that the data to be
imported uses, and built them to be the same named fields as in my main table
for the form. The people who will be using this form are required, when
editing or creating records, to make certain that at least the four required
fields are filled. You are stating this may be the problem. What can i do
to these fields that will prevent access from floating all these warnings and
error messages to me, when in fact none are occurring (it all imports
properly).

Finally, after the data is importd into the append table, the query won't
run. It claims i do not possess the active x control license in order to use
dmcmd.Query [query name].
so i have to do it manually. Again, for non astute or technical people,
this will be a problem. I want them to have to click buttons, not learn
access database.


Lance said:
You get data type criteria mismatch errors when you're trying to compare two
values with different data types, in this case the numeric [Sap Company Code]
field with a string from your textbox. We were actually forcing the result
to string by putting it in quotes.. easy enough to fix. Try:

Me.Filter = "[Sap Company Code] = " & Me.saplistboxcontrol.Text

Pwyd said:
yes, its numeric. why should that matter?


:

is [Sap Company Code] a numeric field?

:

All right. now i'm getting an error for a Data type criteria mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text & "'"
Me.FilterOn = True
 
G

George Nicholson

-Create a SELECT query to use as the recordsource for your listbox. Only
include the fields you need to display and/or use when filtering.
-Make sure that, under query properties, you set "Unique values" to Yes.
This will change the underlying SQL from "SELECT.." to SELECT DISTINCT.."
This should remove duplicates.
-Save the query
-Assign that query to your Listbox.

--
HTH,
George


Pwyd said:
Mind you, i'm tryign to remove the duplicates from the LIST. not from the
records that are filtered. if two records have the same SAp Company code,
i
only want the number to show up once in the listbox control.

Pwyd said:
All right, so now its filtering. That leaves a second problem, how to
remove duplicates. I had found a snippet on the web that involved
comparing
the list to itself unless it was null, and so on. When i tried it
though, i
must have improperly referred to some of the expressions. I took access
database zillions of years ago. Honestly, the data i can find online or
in
the help files provided elsewhere by Microsoft as completely useless. It
will simply tell you what the autocomplete already tells you. that it
requires such and such an expresion and so on. unfortunately, it never
mentions what this expression should be constructed of, or any special
syntax
involved. Useless.

For me, more importantly, will be properly importing the data.
I was told that directly importing it into a table was a very bad idea,
and
could cause all sorts of problems (it did).
so i created a second table, using only the fields that the data to be
imported uses, and built them to be the same named fields as in my main
table
for the form. The people who will be using this form are required, when
editing or creating records, to make certain that at least the four
required
fields are filled. You are stating this may be the problem. What can i
do
to these fields that will prevent access from floating all these warnings
and
error messages to me, when in fact none are occurring (it all imports
properly).

Finally, after the data is importd into the append table, the query won't
run. It claims i do not possess the active x control license in order to
use
dmcmd.Query [query name].
so i have to do it manually. Again, for non astute or technical people,
this will be a problem. I want them to have to click buttons, not learn
access database.


Lance said:
You get data type criteria mismatch errors when you're trying to
compare two
values with different data types, in this case the numeric [Sap Company
Code]
field with a string from your textbox. We were actually forcing the
result
to string by putting it in quotes.. easy enough to fix. Try:

Me.Filter = "[Sap Company Code] = " & Me.saplistboxcontrol.Text

:

yes, its numeric. why should that matter?


:

is [Sap Company Code] a numeric field?

:

All right. now i'm getting an error for a Data type criteria
mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text
& "'"
Me.FilterOn = True
 
G

Guest

All right. That works well enough. What if i wanted to perform the same
function using a combo box though?


George Nicholson said:
-Create a SELECT query to use as the recordsource for your listbox. Only
include the fields you need to display and/or use when filtering.
-Make sure that, under query properties, you set "Unique values" to Yes.
This will change the underlying SQL from "SELECT.." to SELECT DISTINCT.."
This should remove duplicates.
-Save the query
-Assign that query to your Listbox.

--
HTH,
George


Pwyd said:
Mind you, i'm tryign to remove the duplicates from the LIST. not from the
records that are filtered. if two records have the same SAp Company code,
i
only want the number to show up once in the listbox control.

Pwyd said:
All right, so now its filtering. That leaves a second problem, how to
remove duplicates. I had found a snippet on the web that involved
comparing
the list to itself unless it was null, and so on. When i tried it
though, i
must have improperly referred to some of the expressions. I took access
database zillions of years ago. Honestly, the data i can find online or
in
the help files provided elsewhere by Microsoft as completely useless. It
will simply tell you what the autocomplete already tells you. that it
requires such and such an expresion and so on. unfortunately, it never
mentions what this expression should be constructed of, or any special
syntax
involved. Useless.

For me, more importantly, will be properly importing the data.
I was told that directly importing it into a table was a very bad idea,
and
could cause all sorts of problems (it did).
so i created a second table, using only the fields that the data to be
imported uses, and built them to be the same named fields as in my main
table
for the form. The people who will be using this form are required, when
editing or creating records, to make certain that at least the four
required
fields are filled. You are stating this may be the problem. What can i
do
to these fields that will prevent access from floating all these warnings
and
error messages to me, when in fact none are occurring (it all imports
properly).

Finally, after the data is importd into the append table, the query won't
run. It claims i do not possess the active x control license in order to
use
dmcmd.Query [query name].
so i have to do it manually. Again, for non astute or technical people,
this will be a problem. I want them to have to click buttons, not learn
access database.


:

You get data type criteria mismatch errors when you're trying to
compare two
values with different data types, in this case the numeric [Sap Company
Code]
field with a string from your textbox. We were actually forcing the
result
to string by putting it in quotes.. easy enough to fix. Try:

Me.Filter = "[Sap Company Code] = " & Me.saplistboxcontrol.Text

:

yes, its numeric. why should that matter?


:

is [Sap Company Code] a numeric field?

:

All right. now i'm getting an error for a Data type criteria
mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text
& "'"
Me.FilterOn = True
 
G

Guest

I still have two other problems though. Lets forget the combo box for now,
what i have works well enough.

One. importing data is showing errors, or "possible" errors and warning
messages, even though when complete it states that none of the records had
any errors. its two extra clicks, for nothing. No validation rules were
violated or zero lenght strings. there are 4 required fields, none of them
have zero length strings allowed.

Two.
One of my yes/no fields, which is a text field inthis case, defaults to 0
instead of yes, or no. even setting the default value to ="no" doesn't work
here. it keeps insisting on putting 0 (which i suppose is the default value,
false). how do i solve this problem.


three.
This one may not be an issue in the end, it really depends on how far i can
take this application. I"ll have web questions no doubt, but i suppose some
of our people here will spare a millisecond ot help on those. However,
until its up on the web, when i print out any of the records, it does some
very strange things:

a) Anytime a checkbox has made a field visible, it will print ALL of the
records with that field visible, even if none of the other records have valid
data in that field.

b) Some of the text further down on the page is cut off, by what text box
or contrivance, i have no idea. There's nothing there in any field, hidden
or otherwise, but some of the words are just cut off (in the middle of the
page) for no apparent reason.

Pwyd said:
All right. That works well enough. What if i wanted to perform the same
function using a combo box though?


George Nicholson said:
-Create a SELECT query to use as the recordsource for your listbox. Only
include the fields you need to display and/or use when filtering.
-Make sure that, under query properties, you set "Unique values" to Yes.
This will change the underlying SQL from "SELECT.." to SELECT DISTINCT.."
This should remove duplicates.
-Save the query
-Assign that query to your Listbox.

--
HTH,
George


Pwyd said:
Mind you, i'm tryign to remove the duplicates from the LIST. not from the
records that are filtered. if two records have the same SAp Company code,
i
only want the number to show up once in the listbox control.

:

All right, so now its filtering. That leaves a second problem, how to
remove duplicates. I had found a snippet on the web that involved
comparing
the list to itself unless it was null, and so on. When i tried it
though, i
must have improperly referred to some of the expressions. I took access
database zillions of years ago. Honestly, the data i can find online or
in
the help files provided elsewhere by Microsoft as completely useless. It
will simply tell you what the autocomplete already tells you. that it
requires such and such an expresion and so on. unfortunately, it never
mentions what this expression should be constructed of, or any special
syntax
involved. Useless.

For me, more importantly, will be properly importing the data.
I was told that directly importing it into a table was a very bad idea,
and
could cause all sorts of problems (it did).
so i created a second table, using only the fields that the data to be
imported uses, and built them to be the same named fields as in my main
table
for the form. The people who will be using this form are required, when
editing or creating records, to make certain that at least the four
required
fields are filled. You are stating this may be the problem. What can i
do
to these fields that will prevent access from floating all these warnings
and
error messages to me, when in fact none are occurring (it all imports
properly).

Finally, after the data is importd into the append table, the query won't
run. It claims i do not possess the active x control license in order to
use
dmcmd.Query [query name].
so i have to do it manually. Again, for non astute or technical people,
this will be a problem. I want them to have to click buttons, not learn
access database.


:

You get data type criteria mismatch errors when you're trying to
compare two
values with different data types, in this case the numeric [Sap Company
Code]
field with a string from your textbox. We were actually forcing the
result
to string by putting it in quotes.. easy enough to fix. Try:

Me.Filter = "[Sap Company Code] = " & Me.saplistboxcontrol.Text

:

yes, its numeric. why should that matter?


:

is [Sap Company Code] a numeric field?

:

All right. now i'm getting an error for a Data type criteria
mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text
& "'"
Me.FilterOn = True
 
G

Guest

Pardon. Let me restate the first bit: On the splash form is an import
button which runs a simple macro. importing the data is not the problem.
when i run the append query to copy the data from the import table over to
the main table, it spews out loads of errors about things it thinks might
happen, but in fact don't. How can i either: quash all of these warnings,
or, evne better, format the table and the appendquery so they play nice
together.


Pwyd said:
I still have two other problems though. Lets forget the combo box for now,
what i have works well enough.

One. importing data is showing errors, or "possible" errors and warning
messages, even though when complete it states that none of the records had
any errors. its two extra clicks, for nothing. No validation rules were
violated or zero lenght strings. there are 4 required fields, none of them
have zero length strings allowed.

Two.
One of my yes/no fields, which is a text field inthis case, defaults to 0
instead of yes, or no. even setting the default value to ="no" doesn't work
here. it keeps insisting on putting 0 (which i suppose is the default value,
false). how do i solve this problem.


three.
This one may not be an issue in the end, it really depends on how far i can
take this application. I"ll have web questions no doubt, but i suppose some
of our people here will spare a millisecond ot help on those. However,
until its up on the web, when i print out any of the records, it does some
very strange things:

a) Anytime a checkbox has made a field visible, it will print ALL of the
records with that field visible, even if none of the other records have valid
data in that field.

b) Some of the text further down on the page is cut off, by what text box
or contrivance, i have no idea. There's nothing there in any field, hidden
or otherwise, but some of the words are just cut off (in the middle of the
page) for no apparent reason.

Pwyd said:
All right. That works well enough. What if i wanted to perform the same
function using a combo box though?


George Nicholson said:
-Create a SELECT query to use as the recordsource for your listbox. Only
include the fields you need to display and/or use when filtering.
-Make sure that, under query properties, you set "Unique values" to Yes.
This will change the underlying SQL from "SELECT.." to SELECT DISTINCT.."
This should remove duplicates.
-Save the query
-Assign that query to your Listbox.

--
HTH,
George


Mind you, i'm tryign to remove the duplicates from the LIST. not from the
records that are filtered. if two records have the same SAp Company code,
i
only want the number to show up once in the listbox control.

:

All right, so now its filtering. That leaves a second problem, how to
remove duplicates. I had found a snippet on the web that involved
comparing
the list to itself unless it was null, and so on. When i tried it
though, i
must have improperly referred to some of the expressions. I took access
database zillions of years ago. Honestly, the data i can find online or
in
the help files provided elsewhere by Microsoft as completely useless. It
will simply tell you what the autocomplete already tells you. that it
requires such and such an expresion and so on. unfortunately, it never
mentions what this expression should be constructed of, or any special
syntax
involved. Useless.

For me, more importantly, will be properly importing the data.
I was told that directly importing it into a table was a very bad idea,
and
could cause all sorts of problems (it did).
so i created a second table, using only the fields that the data to be
imported uses, and built them to be the same named fields as in my main
table
for the form. The people who will be using this form are required, when
editing or creating records, to make certain that at least the four
required
fields are filled. You are stating this may be the problem. What can i
do
to these fields that will prevent access from floating all these warnings
and
error messages to me, when in fact none are occurring (it all imports
properly).

Finally, after the data is importd into the append table, the query won't
run. It claims i do not possess the active x control license in order to
use
dmcmd.Query [query name].
so i have to do it manually. Again, for non astute or technical people,
this will be a problem. I want them to have to click buttons, not learn
access database.


:

You get data type criteria mismatch errors when you're trying to
compare two
values with different data types, in this case the numeric [Sap Company
Code]
field with a string from your textbox. We were actually forcing the
result
to string by putting it in quotes.. easy enough to fix. Try:

Me.Filter = "[Sap Company Code] = " & Me.saplistboxcontrol.Text

:

yes, its numeric. why should that matter?


:

is [Sap Company Code] a numeric field?

:

All right. now i'm getting an error for a Data type criteria
mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text
& "'"
Me.FilterOn = True
 
G

Guest

I keep forgetting little tidbits. When the docmd.Query [queryname] attempts
to run, it states i don't have the proper activex control or permissions to
run that. Whats up with that? THEN the append errors all pop up before it
lets me copy the records over to the main table.


Pwyd said:
I still have two other problems though. Lets forget the combo box for now,
what i have works well enough.

One. importing data is showing errors, or "possible" errors and warning
messages, even though when complete it states that none of the records had
any errors. its two extra clicks, for nothing. No validation rules were
violated or zero lenght strings. there are 4 required fields, none of them
have zero length strings allowed.

Two.
One of my yes/no fields, which is a text field inthis case, defaults to 0
instead of yes, or no. even setting the default value to ="no" doesn't work
here. it keeps insisting on putting 0 (which i suppose is the default value,
false). how do i solve this problem.


three.
This one may not be an issue in the end, it really depends on how far i can
take this application. I"ll have web questions no doubt, but i suppose some
of our people here will spare a millisecond ot help on those. However,
until its up on the web, when i print out any of the records, it does some
very strange things:

a) Anytime a checkbox has made a field visible, it will print ALL of the
records with that field visible, even if none of the other records have valid
data in that field.

b) Some of the text further down on the page is cut off, by what text box
or contrivance, i have no idea. There's nothing there in any field, hidden
or otherwise, but some of the words are just cut off (in the middle of the
page) for no apparent reason.

Pwyd said:
All right. That works well enough. What if i wanted to perform the same
function using a combo box though?


George Nicholson said:
-Create a SELECT query to use as the recordsource for your listbox. Only
include the fields you need to display and/or use when filtering.
-Make sure that, under query properties, you set "Unique values" to Yes.
This will change the underlying SQL from "SELECT.." to SELECT DISTINCT.."
This should remove duplicates.
-Save the query
-Assign that query to your Listbox.

--
HTH,
George


Mind you, i'm tryign to remove the duplicates from the LIST. not from the
records that are filtered. if two records have the same SAp Company code,
i
only want the number to show up once in the listbox control.

:

All right, so now its filtering. That leaves a second problem, how to
remove duplicates. I had found a snippet on the web that involved
comparing
the list to itself unless it was null, and so on. When i tried it
though, i
must have improperly referred to some of the expressions. I took access
database zillions of years ago. Honestly, the data i can find online or
in
the help files provided elsewhere by Microsoft as completely useless. It
will simply tell you what the autocomplete already tells you. that it
requires such and such an expresion and so on. unfortunately, it never
mentions what this expression should be constructed of, or any special
syntax
involved. Useless.

For me, more importantly, will be properly importing the data.
I was told that directly importing it into a table was a very bad idea,
and
could cause all sorts of problems (it did).
so i created a second table, using only the fields that the data to be
imported uses, and built them to be the same named fields as in my main
table
for the form. The people who will be using this form are required, when
editing or creating records, to make certain that at least the four
required
fields are filled. You are stating this may be the problem. What can i
do
to these fields that will prevent access from floating all these warnings
and
error messages to me, when in fact none are occurring (it all imports
properly).

Finally, after the data is importd into the append table, the query won't
run. It claims i do not possess the active x control license in order to
use
dmcmd.Query [query name].
so i have to do it manually. Again, for non astute or technical people,
this will be a problem. I want them to have to click buttons, not learn
access database.


:

You get data type criteria mismatch errors when you're trying to
compare two
values with different data types, in this case the numeric [Sap Company
Code]
field with a string from your textbox. We were actually forcing the
result
to string by putting it in quotes.. easy enough to fix. Try:

Me.Filter = "[Sap Company Code] = " & Me.saplistboxcontrol.Text

:

yes, its numeric. why should that matter?


:

is [Sap Company Code] a numeric field?

:

All right. now i'm getting an error for a Data type criteria
mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text
& "'"
Me.FilterOn = True
 
G

Guest

The list box that shows the orgs has aproblem: when it reaches the number on
the bottom, it won't allow me to move my selection back up to the first
number on the box: its a one way trip.

Pwyd said:
I keep forgetting little tidbits. When the docmd.Query [queryname] attempts
to run, it states i don't have the proper activex control or permissions to
run that. Whats up with that? THEN the append errors all pop up before it
lets me copy the records over to the main table.


Pwyd said:
I still have two other problems though. Lets forget the combo box for now,
what i have works well enough.

One. importing data is showing errors, or "possible" errors and warning
messages, even though when complete it states that none of the records had
any errors. its two extra clicks, for nothing. No validation rules were
violated or zero lenght strings. there are 4 required fields, none of them
have zero length strings allowed.

Two.
One of my yes/no fields, which is a text field inthis case, defaults to 0
instead of yes, or no. even setting the default value to ="no" doesn't work
here. it keeps insisting on putting 0 (which i suppose is the default value,
false). how do i solve this problem.


three.
This one may not be an issue in the end, it really depends on how far i can
take this application. I"ll have web questions no doubt, but i suppose some
of our people here will spare a millisecond ot help on those. However,
until its up on the web, when i print out any of the records, it does some
very strange things:

a) Anytime a checkbox has made a field visible, it will print ALL of the
records with that field visible, even if none of the other records have valid
data in that field.

b) Some of the text further down on the page is cut off, by what text box
or contrivance, i have no idea. There's nothing there in any field, hidden
or otherwise, but some of the words are just cut off (in the middle of the
page) for no apparent reason.

Pwyd said:
All right. That works well enough. What if i wanted to perform the same
function using a combo box though?


:

-Create a SELECT query to use as the recordsource for your listbox. Only
include the fields you need to display and/or use when filtering.
-Make sure that, under query properties, you set "Unique values" to Yes.
This will change the underlying SQL from "SELECT.." to SELECT DISTINCT.."
This should remove duplicates.
-Save the query
-Assign that query to your Listbox.

--
HTH,
George


Mind you, i'm tryign to remove the duplicates from the LIST. not from the
records that are filtered. if two records have the same SAp Company code,
i
only want the number to show up once in the listbox control.

:

All right, so now its filtering. That leaves a second problem, how to
remove duplicates. I had found a snippet on the web that involved
comparing
the list to itself unless it was null, and so on. When i tried it
though, i
must have improperly referred to some of the expressions. I took access
database zillions of years ago. Honestly, the data i can find online or
in
the help files provided elsewhere by Microsoft as completely useless. It
will simply tell you what the autocomplete already tells you. that it
requires such and such an expresion and so on. unfortunately, it never
mentions what this expression should be constructed of, or any special
syntax
involved. Useless.

For me, more importantly, will be properly importing the data.
I was told that directly importing it into a table was a very bad idea,
and
could cause all sorts of problems (it did).
so i created a second table, using only the fields that the data to be
imported uses, and built them to be the same named fields as in my main
table
for the form. The people who will be using this form are required, when
editing or creating records, to make certain that at least the four
required
fields are filled. You are stating this may be the problem. What can i
do
to these fields that will prevent access from floating all these warnings
and
error messages to me, when in fact none are occurring (it all imports
properly).

Finally, after the data is importd into the append table, the query won't
run. It claims i do not possess the active x control license in order to
use
dmcmd.Query [query name].
so i have to do it manually. Again, for non astute or technical people,
this will be a problem. I want them to have to click buttons, not learn
access database.


:

You get data type criteria mismatch errors when you're trying to
compare two
values with different data types, in this case the numeric [Sap Company
Code]
field with a string from your textbox. We were actually forcing the
result
to string by putting it in quotes.. easy enough to fix. Try:

Me.Filter = "[Sap Company Code] = " & Me.saplistboxcontrol.Text

:

yes, its numeric. why should that matter?


:

is [Sap Company Code] a numeric field?

:

All right. now i'm getting an error for a Data type criteria
mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text
& "'"
Me.FilterOn = True
 
G

Guest

Have you verified the number of records being appended is identical to the
number of records in the table you're trying to append? If it's telling you
that validation errors are taking place.. then it's safe to assume that there
are. Just because it's letting you append anyway, and the data that makes it
through looks OK, doesn't mean these errors are not taking place.

You have 3 options.

1) You can figure out why the validation errors are taking place.. which we
haven't had much luck at so far.
2) You can remove the validation codes from your table ( no required fields
and allow zero length ), if that isn't going to cause other problems for you.
3) You can use setwarnings to false in you macro to block the error
messages, but any data errors will still happen.


If you have a yes/no ( boolean) field it ISN'T a text field, even if you
display it in a text box. A yes/no ( boolean ) field must be either true or
false / yes or no... this is stored as 0 and 1 or -1. If you want to
display the value on a form consider using a checkbox, else you will need to
write an iif statement to force it to display a text value.

As for your printing problems, what type of form are you printing from? You
can selectively format some form elements in some types of forms, but many
you cannot. If you do something to it for one record, it will appear that
way for them all.

Text gets cut off when it exceeds the length that the control displaying it
can present at any given time. You will need to make the field width wider
to handle longer strings.

Pwyd said:
Pardon. Let me restate the first bit: On the splash form is an import
button which runs a simple macro. importing the data is not the problem.
when i run the append query to copy the data from the import table over to
the main table, it spews out loads of errors about things it thinks might
happen, but in fact don't. How can i either: quash all of these warnings,
or, evne better, format the table and the appendquery so they play nice
together.


Pwyd said:
I still have two other problems though. Lets forget the combo box for now,
what i have works well enough.

One. importing data is showing errors, or "possible" errors and warning
messages, even though when complete it states that none of the records had
any errors. its two extra clicks, for nothing. No validation rules were
violated or zero lenght strings. there are 4 required fields, none of them
have zero length strings allowed.

Two.
One of my yes/no fields, which is a text field inthis case, defaults to 0
instead of yes, or no. even setting the default value to ="no" doesn't work
here. it keeps insisting on putting 0 (which i suppose is the default value,
false). how do i solve this problem.


three.
This one may not be an issue in the end, it really depends on how far i can
take this application. I"ll have web questions no doubt, but i suppose some
of our people here will spare a millisecond ot help on those. However,
until its up on the web, when i print out any of the records, it does some
very strange things:

a) Anytime a checkbox has made a field visible, it will print ALL of the
records with that field visible, even if none of the other records have valid
data in that field.

b) Some of the text further down on the page is cut off, by what text box
or contrivance, i have no idea. There's nothing there in any field, hidden
or otherwise, but some of the words are just cut off (in the middle of the
page) for no apparent reason.

Pwyd said:
All right. That works well enough. What if i wanted to perform the same
function using a combo box though?


:

-Create a SELECT query to use as the recordsource for your listbox. Only
include the fields you need to display and/or use when filtering.
-Make sure that, under query properties, you set "Unique values" to Yes.
This will change the underlying SQL from "SELECT.." to SELECT DISTINCT.."
This should remove duplicates.
-Save the query
-Assign that query to your Listbox.

--
HTH,
George


Mind you, i'm tryign to remove the duplicates from the LIST. not from the
records that are filtered. if two records have the same SAp Company code,
i
only want the number to show up once in the listbox control.

:

All right, so now its filtering. That leaves a second problem, how to
remove duplicates. I had found a snippet on the web that involved
comparing
the list to itself unless it was null, and so on. When i tried it
though, i
must have improperly referred to some of the expressions. I took access
database zillions of years ago. Honestly, the data i can find online or
in
the help files provided elsewhere by Microsoft as completely useless. It
will simply tell you what the autocomplete already tells you. that it
requires such and such an expresion and so on. unfortunately, it never
mentions what this expression should be constructed of, or any special
syntax
involved. Useless.

For me, more importantly, will be properly importing the data.
I was told that directly importing it into a table was a very bad idea,
and
could cause all sorts of problems (it did).
so i created a second table, using only the fields that the data to be
imported uses, and built them to be the same named fields as in my main
table
for the form. The people who will be using this form are required, when
editing or creating records, to make certain that at least the four
required
fields are filled. You are stating this may be the problem. What can i
do
to these fields that will prevent access from floating all these warnings
and
error messages to me, when in fact none are occurring (it all imports
properly).

Finally, after the data is importd into the append table, the query won't
run. It claims i do not possess the active x control license in order to
use
dmcmd.Query [query name].
so i have to do it manually. Again, for non astute or technical people,
this will be a problem. I want them to have to click buttons, not learn
access database.


:

You get data type criteria mismatch errors when you're trying to
compare two
values with different data types, in this case the numeric [Sap Company
Code]
field with a string from your textbox. We were actually forcing the
result
to string by putting it in quotes.. easy enough to fix. Try:

Me.Filter = "[Sap Company Code] = " & Me.saplistboxcontrol.Text

:

yes, its numeric. why should that matter?


:

is [Sap Company Code] a numeric field?

:

All right. now i'm getting an error for a Data type criteria
mismatch.

i have:
Me.Filter = "[Sap Company Code] = '" & Me.saplistboxcontrol.Text
& "'"
Me.FilterOn = True
 

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