microsoft+access+course - attaching msgboxmacro parameter
Microsoft Office TrainingThe UK's Number 1 for Microsoft Office Training Sitemap add this page to your favourites/bookmarksBookmark page
 
view a printable version of this pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » microsoft+access+course - Attaching a msgbox/macro to a parameter

microsoft+access+course - Attaching a msgbox/macro to a parameter

resolvedResolved · Low Priority · Version Standard

replyReplyTue 24 Apr 2007, 17:39Delegate Shola said...

Attaching a msgbox/macro to a parameter

Is it possible to attach a msgbox to a parameter?

I have created a parameter in a query and the query is linked to a form. It is a date parameter. However it still aloows the user to enter an invalid date e.g. 31/04/07. I would like to attach a macro to the parameter to prevent the user from entering such invalid dates, using msgboxs and macro control-actions

For upcoming training course dates see: Pricing & availability

replyReplyWed 25 Apr 2007, 12:12 Edited on Wed 25 Apr 2007, 12:12Trainer Carlos said...

RE: Attaching a msgbox/macro to a parameter

Shola

To Verify the value of an entry before running the query do the following:

Create a form with a text box (For the date) And a Command Button

In the command button On Click command write code along these lines:

Private Sub cmdOK_Click()

If IsDate(txtDate.Value) = False Then

MsgBox "Please enter correct Date"
txtDate.SetFocus
Exit Sub
End If

DoCmd.OpenQuery "My Query"

End Sub

Then in the Query, in the criteria line for the date, use Build to set the query to look at txtDate on the form for the required value.

Regards

Carlos

 

 

Access tip:

Deleting duplicate records from a table

You cannot delete records tables where there duplicate records. A way around this is to create a new table which wont hold the duplicates. and then deleting the old table.

1. Use a make-table query based on this table only. IMPORTANT - Ensure that you include all of the fields from your original table or you may loose data.

2. Open the query's property sheet by using VIEW, QUERY, PROPERTIES, and set the Unique Values property to Yes

3. Because you have selected the Unique Values to Yes when you run the query, Access creates a new table without duplicate records. You can now delete the old table and rename the new one.

View all Access hints and tips

forum postHow do your filter search in reports

» Forum post: Reports


Rate this page:
2.2/5 (213 votes cast)
Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses
Microsoft Certified Partner
Security Seal verified by visa, mastercard securecard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Management training

Professional Skills courses
Project Management Course London
Project Management Courses London
Project Management Training London
Project Management Training
Project Seminar
Project Seminars
Time Management Course London
Time Management London
Time Management Courses London
Time Management Training London
Introduction to Finance course
Assertiveness Skills course
Effective Communications Skills training
Presentation Skills London

Training Formats

Public scheduled courses
On-site training
Closed company courses

Consultancy
Application Development

Blogs

Excel Training
MS Project Training
Microsoft Training Blog

Version differences

Office 2010 vs 2007
MS Project version differences

Training Information

London Computer Training
Computer Training London
Docklands Training Courses
Docklands Training London

Training venues London
Client list
FAQ
Pricing and availability
Course details / Syllabus

Training Articles
Training Information

Microsoft training

Microsoft Office training
& IT Applications

Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training
MS Project courses
MS Project training
Outlook courses
PowerPoint courses
PowerPoint training
VBA courses
Word courses
Microsoft.training
(more...)

Excel Training

Excel courses
Excel Training Courses Medway
Autonumber in Excel
Microsoft Excel training
Basic Excel Courses
Basic Excel Course
Basic Excel Training

Interested in MS Access training?

Access courses
Microsoft Access training
Microsoft access courses
Microsoft training access course
Microsoft+access+training
Access courses in london

Training provider

Training providers
IT training companies
IT training providers
Management Training providers
Management Training provider

Event history, feedback results
Events in 2012 · 2011 · 2010 · More

See also

Crystal Reports training