Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / General DB Topics / DB Theory / August 2005

Tip: Looking for answers? Try searching our database.

Validation Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keith Austin - 16 Aug 2005 00:17 GMT
I need to produce a macro for a project that I have to do in my course in IT
"Certificate III IT (Software Applications) Unit ICAITUO18C". The macro
needs to validate previously imported data from Text Files. I have already
written the macro to import the data and now this Validate Macro forms part
of that Macro. The case scenario relates to a Music Expo and 3 bands appear
in this exercise. Obviously the previous macro wont complete until this
macro hace been written.

Macro Name: mcrValidate
Description: Validate imported data
Solution:
1. If band name is empty insert name "Douglas Groovers"
2. If band name is "FS" replace with "Funk Sands"
3. If type is "Pensioner" or "A" replace with "Adult"
4. If type is "S" replace with "Student"
5. If status is "Current" or "A" replace with "Active"
6. If status is "NotCurrent" or "N" replace with "Inactive"
7. If type not "Under 14" go to next record otherwise delete record from
table.

The purpose of this is because the 3 different bands use different names /
methods to identify their data, this macro is to make them all uniform.

Scope: To be run once only
Limitations: Specific to text files provided - do not use with other text
files.

Hint: Tools>Options>Edit/Find tab and remove tick for confirm - Record
changes so Access does not prompt for confirmation on every record to be
deleted.

I have made an atempt on the first "Condition" but i cannot see any action
relating to inserting/changing the data in the empty field (replace empty
with "Douglas groovers" I was given a hint to use "Condition- [Band
Name]=Null then Action - SetValue" at the bottom there are 2 areas to fill
in Item and Expression. The previous macro opens a form "frmValidate" and
there are text boxes on this form one of which is "Band Name" so on the Item
area I use [Forms]![frmValidate]![Band Name] then from there no matter what
i place in there including just "Douglas Groovers" I get error messages I
have done all this as instructed by my tutor either I have mis understood
her or I have been given the wrong information. Any assistance will be
greatly appreciated. I am really an absolute beginner where Access is
concerned. I can only be guided by the info I have. The learning material /
courseware does give ideas for "some macros" but not of this nature.

Regards Keith
Frank_Hamersley - 16 Aug 2005 02:31 GMT
This is a theory list - you have a practical problem - good luck
(elsewhere)!

Cheers, Frank.

> I need to produce a macro for a project that I have to do in my course in IT
> "Certificate III IT (Software Applications) Unit ICAITUO18C". The macro
[quoted text clipped - 42 lines]
>
> Regards Keith
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.