Working with access data
Posted: Fri Feb 16, 2007 2:52 pm
Hello all,
I am currently finding myself working in an unfamiliar environment. When asked to make sense of some data in MS Access, I poked around for a little, quickly chucking the GUI interface, and moving to good old fashioned SQL queries. I even found myself writing data import modules when a coworker came up to me, told me to close the window with my code in it, and go to file->import. Oh well, all part of the learning process (my code worked equally well if not better than the GUI import process
)
But what I have to do now is create an access report. I have understood how to create reports with the data in the database, but I need to put in some logic in there. For instance, if there's one value in one column, I need a column in a report to be set to a certain value as well. In the PHP/MySQL world, this is pretty simple:
In Access, I can't seem to recreate the mysql_fetch_row() part...How can I actually get access to the data from within VBA? And once I have that data, how can write it to an access report?
Thanks!
P.S. I'm a business analyst with some programming skills, not a programmer.
Don't judge me too harshly.
I am currently finding myself working in an unfamiliar environment. When asked to make sense of some data in MS Access, I poked around for a little, quickly chucking the GUI interface, and moving to good old fashioned SQL queries. I even found myself writing data import modules when a coworker came up to me, told me to close the window with my code in it, and go to file->import. Oh well, all part of the learning process (my code worked equally well if not better than the GUI import process
But what I have to do now is create an access report. I have understood how to create reports with the data in the database, but I need to put in some logic in there. For instance, if there's one value in one column, I need a column in a report to be set to a certain value as well. In the PHP/MySQL world, this is pretty simple:
Code: Select all
$result = mysql_query("SELECT `field` from table",$db);
while ($row = mysql_fetch_tow($result)){
if ($row['field']=="value"){
$something = 1;
}else{
$something = 2;
}
//etc
}Thanks!
P.S. I'm a business analyst with some programming skills, not a programmer.