473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Validation Macro

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
Nov 13 '05 #1
2 2250
walk in the park. Make friends with update queries. That solves 1-6.
For #7, use a delete query. Also turn your warnings off and on... see
the help file

but test this with a backup table or tables first. No sense in messing
up perfectly good data...

Nov 13 '05 #2
As i said I am new to Access can you please be a little more specific
with the use of update queries is a macro. The criteria demands a macro
is used to complete all 7 steps

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
5
by: Mike Price | last post by:
This may seem simple but I need to validate the postcode properly from an Access form. I know loads of other people have done this so I was wondering if someone could show me how - either by an...
2
by: Pete | last post by:
In Access 95/97 I used to be able to create pull down menus (File,Edit ...) from a macro. It seems there used to be some wizard for that. However in Access 2000 it seems you have to build your...
7
by: Newbie_sw2003 | last post by:
Where should I use them? I am giving you my understandings. Please correct me if I am wrong: MACRO: e.g.:#define ref-name 99 The code is substituted by the MACRO ref-name. So no overhead....
1
by: jhicke03 | last post by:
Hi, This problem has been bugging me for a while. In my form's before update field i have the following code: Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.Nominator_name = "" Or...
1
by: I_am_fitz | last post by:
Is there a way to get around the 256 character limitation on validation text. ok here is my problem: IF I define a name range (testX) and that testX references more than 35 cells in another...
4
by: smowen | last post by:
In Excel I have a validation list which takes values from cells in other worksheets, so the validation list is made of up formulas with cell references in. I want to have a macro which...
2
by: brokkoli88 | last post by:
Hi! I am having sort of a problem with a school assingnment. I need to create a macro that checks if the content in a cell is a number. If the value is a percentage, I need the macro to check if...
6
by: Lara1 | last post by:
I'm trying to get certain cells to show a hovering alert message when I click on them. (I don't want an error-message style box to pop up, because I'll eventually want it to show for lots of cells...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.