473,748 Members | 2,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Validation Macro

I need to produce a macro for a project that I have to do in my course in IT
"Certificat e 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>E dit/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 "frmValidat e" 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 2268
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
34066
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 capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
5
15939
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 input mask or a macro I just don't feel like re-inventing the wheel Thanks in advance Mike Price
2
3491
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 menus by customizing a toolbar. With this method you have to create a separate macro for every single menu and sub menu. The old method would allow me to include several menus (File/ print/ page setup ...) all within one macro. Now it seems I...
7
23555
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. Execution is faster. Where will it be stotred?(Is it in bss/stack/?) FUNCTION:
1
3393
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 IsNull(Me.Nominator_name) Then MsgBox "Please fill in your name", vbCritical + vbOKOnly + vbDefaultButton2, "MISSING DATA" Me.Nominator_name.SetFocus DoCmd.CancelEvent Exit Sub
1
3497
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 worksheet (sheet1) with over 20 characters of data in each cell (well over 256) then I go to sheet2 put data validation on a Cell (validation
4
1221
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 automatically sorts the list if a value within the list changes. I tried using a worksheet_change macro, but this only works if the content of a cell changes and doesn't work with formulas. Is there any way to do this? Cheers
2
1101
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 the value is between 0% and 100%. I also need the macro to give the user a message if a mistake occurs (using MsgBox).... I've done the first part, using IsNumeric, but I can not figure out how to do the other instructions.. Please help me out, Close...
6
11470
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 at once.) I recorded a macro to get the code, which I tweaked minimally, and pasted into a clean spreadsheet to test it. It seems to work beautifully. However, when I try to apply the same code within a larger programme, in a working spreadsheet,...
0
9555
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9250
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8247
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4878
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.