Warning Message

Dec 11, 2006

can someone please modify the following code to add a warning message to an add button.................this add button allows to add details filled in a form...


Private Sub addrec_Click()
Dim strSQL As String
DoCmd.SetWarnings False

strSQL = "INSERT INTO tab_main ([username], [cost_centre], [number], [phone_model], [imei], [puk_code], [sim_no], [date_issued], [notes], [tariff], [call_int], [roam]) VALUES ('" & Me.username & "','" & Me.cost_centre & "','" & Me.number & "','" & Me.phone_model & "','" & Me.imei & "','" & Me.puk_code & "','" & Me.sim_no & "',#" & Me.date_issued & "#,'" & Me.notes & "','" & Me.tariff & "'," & Me.call_int & "," & Me.roam & ")"

DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
End Sub



warning message such as Are you sure you would like to add USERNAME(whateva is inserted in the USERNAME FIELD)


thanks

View Replies


ADVERTISEMENT

Warning Message...

Sep 14, 2005

Anyone know how to suppress the folowing warning:

(I don't have admin rights so my solution will have to be done within Access :rolleyes: )

View 3 Replies View Related

Warning Message

Sep 9, 2006

ok, i'm probably gonna confuse a few ppl here, lol :rolleyes:

i keep getting a warning message when i try to open winamp from within access, is there any way i can stop this warning message from appearing?

any help would be most appreciated

View 5 Replies View Related

Close Button With Warning Message

Aug 1, 2006

I use a close button to close a form. There is list box in this Form. If the list box is empty, then simly close the form. However, if there are projects in the list box, I want to give a warning. If the user say YES, then everything in the listbox will be deleted and the form will be closed. If user say NO, tehn the form will not be closed. They then can use anotehr button to save teh projects.

I wrote the follwing code. The delete portion itself works. But it seesm comfused with msgbox. Could you pelase help me correct this code? Thank you very much for your help.

lbDestination -- list box name



Private Sub Close_Click()
On Error GoTo Err_Close_Click

If IsNull(Me.lbDestination) Then
DoCmd.Close
Exit Sub
End If

If MsgBox("You have unsaved initiatives. Are you sure you want to close?", vbQuestion + vbYesNo + vbDefaultButton2, _
"Delete?") = vbYes Then

Dim rsDestination As DAO.Recordset
Set rsDestination = CurrentDb.OpenRecordset("tbInit", dbOpenDynaset)

rsDestination.MoveFirst
Do While Not rsDestination.EOF

rsDestination.Edit
rsDestination.Delete
rsDestination.MoveNext
Loop

Me.lbDestination.Requery

End If


Exit_Close_Click:
Exit Sub

Err_Close_Click:
Resume Exit_Close_Click



End Sub

View 4 Replies View Related

Warning Message For Duplicate Entry

Nov 27, 2006

I have struggled with this for so long now I hope someone can help.
I have a form called frm_Collections which is run from the query (qry_Collections). When I type into the Reg field in the Form I would
like the user to know if the Reg details have already been used in a
previous record. The database can have duplicates in this field, however a
"Warning Message" would promt some investigation.
I have tried loads of DLookup on Before Update, but really need setting of
in the right direction.
Thanks

View 3 Replies View Related

Data Access Page - Message Warning

Feb 7, 2006

Hi there,

I apologise if this has been answered, I couldn't find anywhere else on the forum.

On the data access page it gives an annoying warning that says 'This website is using your identity to access a data source. If you trust this website, click OK to continue, otherwise click cancel'.

Is there a way I can suppress this message? It looked cool at the start, but now it's just annoying....

Thanks!

View 1 Replies View Related

A Warning/confirmation Message For User Before Printing??

Mar 12, 2006

Hi all,

I am building a simple db from scratch using the limited knowledge i have, and a lot of the information gained from searching these forums as a guest. I've now reached a point where I can't seem to find what I'm looking for, so any help would be gratefully received!!

I have a single table, single form and single report (told you it was simple;)). The table has nearly 2000 records and 2000 pictures (linked). On the form I can print every record with a single click of a command button. This is great, but I would like a message box to popup and confirm the print action, as this is gonna be expensive if its clicked on every record!!

If anybody can help, I would be chuffed!! I searched the forums and can't seem to find anything on this!!

j

View 2 Replies View Related

General :: Stop Access Warning Message

Feb 14, 2013

I have an Access 2010 db on a shared network drive. All users accessing the db are running Windows 7 OS and have a licensed corporate version of Access 2010. The advanced options "Shared", "Edited record" and "Open dabases by using record-level locking" are turned on. Additionally, the locking time limits are set to their default levels. If a user selects the save icon after making additions or updates, the following waring message appears:

Costar Job Database can't save design changes or save to a new database object because another user has the file open. To save you design changes or to save to a new object, you must have exclusive access to the file.Since I developed the db, I am the only one that makes design or object changes. I know that users don't need to select the save icon to update the db, but I don't want them to "freak out" if they select save and see the message.
Is there any way to prevent the message from being displayed?

View 6 Replies View Related

General :: Warning Message When Deleting A Table

Feb 16, 2015

I have a temporary table within my access database. I have a macro button that makes the table (thus deleting the old one in the process) and then appends information from three other queries to it.I want to stop the standard warning message from coming up. The message I get is below. I have already cleared the action queries check box so the warnings for the making table (if no previous table exists) query and appending data query have disappeared. However the below message still pops up when the make table query begins to try and delete the old table. How I can make it go away?

"The query you are about to run is a make-table query. Unlike most queries that displays data in Datasheet view, a make-table query creates a table and copies specific records from one or more tables and queries. If the table already exists, the query will replace the structure and contents of the table.If your intention is to create or replace a table, click Yes. To avoid being prompted when you run such queries, click the File tab, then click Options. In the Access Options dialog box, click Client Settings. Under Editing, clear the Action queries check box.

View 2 Replies View Related

Subform Record Count Warning Message

Jan 29, 2013

I would like to show a Message box to an operator when a certain number of records have been reached in a subform e.g when 36 records have been entered I want a message to appear telling the operator that a certain report can then be raised. Whether this is possible

View 5 Replies View Related

Warning Message If Field Is Left Blank?

Apr 10, 2014

I have a questions database. When user is filling out the form, the following fields are required: Questions, Author, Type of Question and Answer selected. Answer is selected by clicking on the button next to the Answers. If these fields are not filled out, a user gets a prompt saying that so and so field is blank. If have a problem, it works for all required fields except for Answer. Below is my code. I have attached a screenshot with Author and Answers blank. I only get a warning about the Author and not the Answers.

Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
nullerr = 0
strnull = ""
If IsNull(Me.txtQuestion) Then
nullerr = 1

[code]..

View 3 Replies View Related

Warning Message On Form While Data Is Being Processed

Jul 11, 2013

I do have a DB that takes some data from Stripes and imports them into access. Since this will be a multi user DB I want to make a warning form.

Basically a user will do the download, I want a form or a pop up message that will show to the next user that will open the DB while the download process is ongoing, to see that the download data process is still ongoing, That he needs to wait until the data download has finished.

View 7 Replies View Related

Modules & VBA :: Device Table - Warning Message Based On Combobox Selection

Jul 26, 2013

I have a combobox with several options for a device's parts. When one part is selected, it gets added to a device table.

ComponentCmb
Generator A
Generator B
Gearbox A
Gearbox B
Blades A
Blades B
Blades C
Tower A
Tower B

I want to display an error message if an option is being selected more than once.

For example, if a gearbox has been chosen, then another gearbox cant be chosen too.

How do i display this warning message.

View 3 Replies View Related

Modules & VBA :: Table With 3 Fields - Warning Message Based On Combobox Selection

Jul 29, 2013

I have a table (ComponentT) of different device components a user can select from ( generators, gearboxes, etc.)

The table has 3 fields - ComponentName, ComponentType, ComponenentDetails

I have a query returning all the ComponentDetails values.

I then have a combobox that uses this query as a row source.

The user can select different components they want from the combobox. Once something is selected, it is added to a new table - UserSelectedComponentsT

As a device can have only one gearbox or one generator etc. I want a warning messagebox to be displayed if the user tries to select a generator from the combobox when one has been previously selected.

View 1 Replies View Related

Getting Rid Of A Warning

Jul 11, 2006

i recently installed MS Office 2003, and now everytime i am opening an access database, i am getting a security warning asking me if i would like to block unsafe expressions. From the help i read that in order to get rid of this security warning, i should install the Microsoft Jet 4.0 (SP8). After i download it from the Microsoft Website, when i am trying to install the exe file, i am getting a message, that my system already has a newer service pack installed and i do not need to install it. However, since i do still get this message about safe expressions, is there any other alternatives how can i get rid of it ?

Thank You

View 2 Replies View Related

Pop Up Warning

Sep 26, 2006

I need to be able to cause a warning box to appear when records for high risk clients are viewed. When a risk assessment is carried out I need to show the result as being either High, Medium or Low on the Client Form. If the result is high I want every worker accessing the record to be in no doubt as to what they need to do if a visit to the individual is being made. Thanks in advance.

Doug

View 9 Replies View Related

Flag Up A Warning

Feb 6, 2006

Hey there

there is a function that I wanted to do on my form but can't think of a way
what I want to do is to show up a flag after 14 days and 28 days of a date with missed appointment being ticked
say there are two fields in the section

AppointmentDate
Missed

Will I be able to do this in access?

Please advice
Cheers
Si

View 6 Replies View Related

Warning When Changing

Aug 27, 2006

Well, problem I should know how to solve! Or at least be able to find in the "search" But...... niether..... So this should be a simple one...
Have a form with a ClientID combo.... If this record is changed I want a warning message before... So I decided to do it as a function then call it on change...

Private Function ChangeClient()

Dim Msg, Style, Title, Response, MyString
Dim Cancel As Integer

Msg = "You are about to change the Client for this Project!" & Chr(13) & "Do you want to continue ?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "WARNING"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
MyString = "Yes"
ElseIf Response = vbNo Then

MyString = "No"
Cancel = True
Undo
End If
End Function

Now the problem is.... What event to call this on!?!?
It works fine on several events on a current record...
BUT... when it is a new record, and you pick the client from the dropdown, it sees a change and runs the function. That clear?
I was thinking of running a "If ... Then" statement so if it a new record the function will not be called.
Got to be an easier way to simply warn of a field change!
Ideas???
Thanks

View 2 Replies View Related

Stop Warning

Oct 18, 2006

This should be a simple one.... But can't seem to find the answer.... I have put a line of code on the open event of a seconadry form.... First form is "Clients" second form is "Contracts" If no the client has no contracts the code goes.....

Private Sub Form_Open(Cancel As Integer)
If IsNull(DateOfSale) Or DateOfSale = " " Then
MsgBox "No Contract Exist"
Cancel = True
End If
End Sub

After the first message box I get a "Access" message box... "The OpenForm action was canceled" ....... Thats fine.... we know that... But we don't need to know that. How can I stop the second message box from opening? Or can I ?

View 11 Replies View Related

Getting A Possible Duplicate Warning?

Feb 3, 2004

I am running Access 2002 on Windows XP Pro and have been teaching myself this program. I have created a large contact database with one main table and associated forms for entering data as well as reports driven by queries. What I can't figure out is how can I get a warning message to appear if a user enters a possible duplicate individual into a form. For example, if someone is entering an individual into a form that is bound to the main table and the same last name belongs to an individual already in the table, it may or may not be a duplicate. I'd like to learn some way of immediately checking the potential duplicates and then deciding weather or not to continue with the entry. Thanks much, in advance for any suggestions.

M Dennis

View 4 Replies View Related

Warning Before Closing The Database

Apr 18, 2006

Hi,

I was wondering if anyone might be able to help me out. Is there a way of programming the access database in such a way that it doen't shut the whole database if someone by accident, presses the cross sign which is right on the top right hand corner. I'd like it to ask the user if they really want to quit first. This way, all the unsaved work can be saved prior to the closing.

Is this possible?

Thank you in advance

View 2 Replies View Related

Warning Messagebox From MS-Access

Sep 5, 2005

I designed a combox and also set the property of 'limited to list' to yes. I also declared the function NotInList with my own message box. But, the MS-Access default warning message box still comes up after displaying my one.

If I turned the property of 'limited to list' to no, it can trigger the function at all.

Does anyone here have any idea on how to turn the system default warning message box off?

Many thanks

View 1 Replies View Related

Warning On A Field Change.

Jan 5, 2007

Hey all,

Thanks for all of the help you have already given me.

Here's another.

What I'm trying to do it get a field, which is a combo box, to pop up a warning when someone tries to change it. I'm trying to keep people from unknowingly change the name field of the time sheet. I only want the warning to show if the field being changed already has a name in it.

Here is what Ive tried.

Private Sub Employee_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.Employee) Then
MsgBox "Are You Sure?"
End If
End Sub

The warning works, but it shows up regardless of the field being empty or filled.

I'd like to have it so I get a msgbox using vbyesno to give the user a choice whether to keep the change or accept it.

Any help would be greatly appreciated.
Thanks again!

The

View 3 Replies View Related

Access 2003 Security Warning

Aug 2, 2005

Every time I open a database, no matter than I've opened it before, it asks opening blalala.mbd maybe harmful to your computer. Is there some way to stop that message? I went searching around in tools customize and nothing.

View 2 Replies View Related

ACCESS 2003 Security Warning

Dec 11, 2005

I have read through the various posting regarding ACCESS 2003 security warnings. As like everyone else, I receive a security warning stating, “This file may not be safe if it contains code that was intended to harm your computer.” I have already installed Microsoft Jet 4.0 Service Pack 8 and I have already enabled sandbox mode. This warning still appears when I try to open databases sent to me by other people. It also appears when I try to create a new database from my own computer. I understand why this message may appear when I open other peoples’ databases, but why would this error message appear on my own computer after I create a database from the very same computer? I would like to market my databases to specific clients, but I need to eliminate the security warnings that would appear each time they opened my databases from their computers. I don’t want to suggest that people change their security levels to low in order to open my database. For this reason, I am considering the option of digitally signing my databases with an authenticated signature. As something like this would run anywhere up to about $400.00, I want to make sure that it would be the best, and correct, option for me. My ultimate question: If I am already trying to create databases from my own computer and receive this warning message, would a digital certificate work in eliminating the error message for my future clients? Also, I understand that I may use the signatures for up to a year. Would I be able to use this for multiple databases that I create as long as it’s within that one year, or would I only be able to sign one specific database and use that same database for the entire year? This is a bit of a pricey endeavor for me, so if there are any other options, I’d love to hear those, too. Thank for the help in advance!

View 4 Replies View Related

How To Disable The Warning When Opening Access

Nov 14, 2006

Hi,

i was wondering if anyone might be able to help me out here. I've been spending hours but to no avail. It seems to be a very trivial problem but i'm just out of luck.

I've been getting this pop-up message everytime i try to open up an access application such as .mdb files.

Open file - Security Warning
Do you want to open this file
...
two buttons: Open & Cancel

My question is if there is a way to turn it off or disable this warning from popping up when opening an access application.

Thank you in advance

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved