X2600
11-27-2012, 09:22 AM
Hey guys,
I'm new to the forum here and I'm just getting back into programming. I'm not use to working with excel, so this is pretty challenging. Anyways, here is some background info if you guys choose to help me out with this issue.
Background:
1) I have a database set up with MS access
2) I have a excel spreadsheet that queries the database for specific columns: LASTNAME, FIRSTNAME, COUNTRY, GRAD, TLA, DEPARTED, REMARKS
3) There is criteria on TLA (checkbox) for yes only, a filter for departed for no only (checkbox), and a filter on remarks so that it doesn't contain records that contain info that I don't want.
Perdicament:
1) The GRAD column is the column i'm having trouble with. The query pulls up records with GRAD (graduation) dates for every month. I want it to pull up records of only grad dates of this month. The GRAD column is an integer, not a date, in the format of YYMMDD.
Need to know how to do:
1) Convert the current date to YYMMDD, and have code that compares the YYMM of the current date to the records being pulled up in excel. The rows that don't match get deleted.
If there is an easier way to do this, please let me in on it. Thank you for your time and your help in advance.
p.s. - Here's the query:
SELECT
`IMSO DATA`.LAST,
`IMSO DATA`.FIRST,
`IMSO DATA`.COUNTRY,
`IMSO DATA`.GRAD,
`IMSO DATA`.TLA,
`IMSO DATA`.DEPARTED,
`IMSO DATA`.REMARKS FROM
`IMSO DATA` `IMSO DATA`
WHERE
(`IMSO DATA`.TLA=1)
AND
(`IMSO DATA`.DEPARTED=0)
AND
(`IMSO DATA`.REMARKS Not Like '%KAFB%'
And `IMSO DATA`.REMARKS Not Like '%KEESLER%'
And `IMSO DATA`.REMARKS Not Like '%COUNTRY%')
ORDER BY `IMSO DATA`.GRAD, `IMSO DATA`.COUNTRY, `IMSO DATA`.LAST
I'm new to the forum here and I'm just getting back into programming. I'm not use to working with excel, so this is pretty challenging. Anyways, here is some background info if you guys choose to help me out with this issue.
Background:
1) I have a database set up with MS access
2) I have a excel spreadsheet that queries the database for specific columns: LASTNAME, FIRSTNAME, COUNTRY, GRAD, TLA, DEPARTED, REMARKS
3) There is criteria on TLA (checkbox) for yes only, a filter for departed for no only (checkbox), and a filter on remarks so that it doesn't contain records that contain info that I don't want.
Perdicament:
1) The GRAD column is the column i'm having trouble with. The query pulls up records with GRAD (graduation) dates for every month. I want it to pull up records of only grad dates of this month. The GRAD column is an integer, not a date, in the format of YYMMDD.
Need to know how to do:
1) Convert the current date to YYMMDD, and have code that compares the YYMM of the current date to the records being pulled up in excel. The rows that don't match get deleted.
If there is an easier way to do this, please let me in on it. Thank you for your time and your help in advance.
p.s. - Here's the query:
SELECT
`IMSO DATA`.LAST,
`IMSO DATA`.FIRST,
`IMSO DATA`.COUNTRY,
`IMSO DATA`.GRAD,
`IMSO DATA`.TLA,
`IMSO DATA`.DEPARTED,
`IMSO DATA`.REMARKS FROM
`IMSO DATA` `IMSO DATA`
WHERE
(`IMSO DATA`.TLA=1)
AND
(`IMSO DATA`.DEPARTED=0)
AND
(`IMSO DATA`.REMARKS Not Like '%KAFB%'
And `IMSO DATA`.REMARKS Not Like '%KEESLER%'
And `IMSO DATA`.REMARKS Not Like '%COUNTRY%')
ORDER BY `IMSO DATA`.GRAD, `IMSO DATA`.COUNTRY, `IMSO DATA`.LAST