Anyone out there know Access and VBA?

Beaver

Maximum Effort
Joined
Oct 18, 2002
Posts
4,440
Reaction score
1,137
Location
Millersburg, OR
I learned access and programming in school, but have since forgotten it. I have data imported into my Access database every day. There are 4 queries on a form within that database that the guys use depending on what metal type they are currently working with. The majority of this imported data is chemistry information, 19 elements in all. If the numbers are within tolerance for a specific metal lot, it is released etc.

My question IS:

How would I write code (probably a series of if then statements) that starts at metal lot 41745 and looks at the output for oxygen, if it is within tolerance, it moves to iron and so on. If all 7 elements are met, I want the output to be 6-4. If 5 of 7 are met(depending on the elements) , I want output to be 1299A and so on.

Am I staring at something incredibly difficult here? I was playing around with VB module, attempting to highlight every record with the current date and nothing happened. So I'm not off to a great start :)
 

jw7

Woof!
LEGACY MEMBER
Supporting Member
Joined
Aug 10, 2002
Posts
8,194
Reaction score
7
Location
Ahwatukee
Wow. Why can't you ask an easy question like how do I sell payphones? :)

Here is a little google trick. Go to google and search on "ms access vbulletin" or "ms access phpbb" - those are the two most popular message board terms out there.

Maybe someone here can help you, but I think you would be better off going to an MS Access board.
 

abomb

Registered User
Supporting Member
Joined
Oct 3, 2003
Posts
21,836
Reaction score
1
You could do it in Excel easily. :)
 
OP
OP
Beaver

Beaver

Maximum Effort
Joined
Oct 18, 2002
Posts
4,440
Reaction score
1,137
Location
Millersburg, OR
LOL. We were using Excel previously. The switch to Access was made to save data entry time (I'm guessing importing data from an Access database to Excel is not possible?) and inevitable mistakes.
 

jw7

Woof!
LEGACY MEMBER
Supporting Member
Joined
Aug 10, 2002
Posts
8,194
Reaction score
7
Location
Ahwatukee
LOL. We were using Excel previously. The switch to Access was made to save data entry time (I'm guessing importing data from an Access database to Excel is not possible?) and inevitable mistakes.

No that is not true. Love or hate Microsoft, their applications can talk to each other.

It can be as simple as copying Access results and doing a simple paste or you can write a VBA macro in Excel.

Here is a link to get you started: Import, export, and link data between Access and Excel
 
OP
OP
Beaver

Beaver

Maximum Effort
Joined
Oct 18, 2002
Posts
4,440
Reaction score
1,137
Location
Millersburg, OR
Thanks for the info. I have updated my plan. I now import the chemistrys to the original Access database. My form has buttons to export the queries to and open the excel spreadsheet. The guys will use these buttons and spreadsheets. Not as clean looking a form, but it will work. Now I am back to the original if-then question. Off to google.
 

Latest posts

Forum statistics

Threads
552,857
Posts
5,403,464
Members
6,315
Latest member
SewingChick65
Top