Input Box into Make Table Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an interesting problem.

Currently my coworker and I are running infromation from our internal system
and running it through excel to insert a couple columns and deleting another
couple. For the most part, we are not having a problem inputting the new
columns with the formulas that we run.

However, there is one field that can really only be done manually, which is
the date.

We have to run the current month's report, last month's report again, and
the month's before that, again. The best possiblity would be to have the
input individual use an InputBox to put the "MMM-YYYY" field in.

I wrote a code that states:

MMM-YYY: InputBox("Input Month (MMM)", "Input Month")&"-"&InputBox("Input
Year (YYYY)", "Input Year")

However, ACCESS returns an error that states "Function is not available in
expressions". If there is another way to do this, that would be great, but
if my coding is wrong that would be better!

Any help would be mucho appreciato.
 
That really doesnt solve the major problem that we are having. Which would
be the error stating:
"Function is not available in expressions"
 
That really doesnt solve the problem at hand, which is the error:

Function not available in expressions.
 
Well you don't need to specify a InputBox
In a Query you'd simply have something like
SELECT A.* FROM MyTable A
WHERE PERIOD = [Enter Period (MMM-YYYY)]
to Prompt For a period

HTH

Pieter
 
Pieter,

We need to input information into the table, not do a lookup against the
table. The parameter function wont work because we are attempted to add the
"MMM-YYYY" to every record. Because the "MMM-YYYY" information has to be
input manually. Basically, we were doing a massive Find and Replace before,
saying that Now() doesnt work for us, we wanted to be able to specify our own
MMM-YYYY because we are running previous month's data. This is why an
InputBox type function would be extremely useful.

Pieter Wijnen said:
Well you don't need to specify a InputBox
In a Query you'd simply have something like
SELECT A.* FROM MyTable A
WHERE PERIOD = [Enter Period (MMM-YYYY)]
to Prompt For a period

HTH

Pieter

Thomas said:
That really doesnt solve the problem at hand, which is the error:

Function not available in expressions.
 
Still Applies only as an update query

UPDATE myTable Set PERIOD=[Enter Period (MMM-YYYY)]


Pieter

Thomas said:
Pieter,

We need to input information into the table, not do a lookup against the
table. The parameter function wont work because we are attempted to add
the
"MMM-YYYY" to every record. Because the "MMM-YYYY" information has to be
input manually. Basically, we were doing a massive Find and Replace
before,
saying that Now() doesnt work for us, we wanted to be able to specify our
own
MMM-YYYY because we are running previous month's data. This is why an
InputBox type function would be extremely useful.

Pieter Wijnen said:
Well you don't need to specify a InputBox
In a Query you'd simply have something like
SELECT A.* FROM MyTable A
WHERE PERIOD = [Enter Period (MMM-YYYY)]
to Prompt For a period

HTH

Pieter

Thomas said:
That really doesnt solve the problem at hand, which is the error:

Function not available in expressions.

:

One inputbox?
InputBox("Input Period (MMM-YYYY)", "Input Period")

Pieter


I have an interesting problem.

Currently my coworker and I are running infromation from our
internal
system
and running it through excel to insert a couple columns and deleting
another
couple. For the most part, we are not having a problem inputting
the
new
columns with the formulas that we run.

However, there is one field that can really only be done manually,
which
is
the date.

We have to run the current month's report, last month's report
again,
and
the month's before that, again. The best possiblity would be to
have
the
input individual use an InputBox to put the "MMM-YYYY" field in.

I wrote a code that states:

MMM-YYY: InputBox("Input Month (MMM)", "Input
Month")&"-"&InputBox("Input
Year (YYYY)", "Input Year")

However, ACCESS returns an error that states "Function is not
available
in
expressions". If there is another way to do this, that would be
great,
but
if my coding is wrong that would be better!

Any help would be mucho appreciato.
 
Back
Top