Modules & VBA :: Show Pop Up Message Depending On 2 Fields Value Differences
Oct 7, 2014
I have 2 fields on my form service interval combo box and vehicle mileage text box I m trying to create a pop up message on there values
if service interval is 12,000 and the mileage entered in the vehicle mileage is over 12,000 then show pop up message.
this works but I'm sure its wrong don't no why I need the -1 anyways here's what I have
Code:
If Me.Vehicle_Mileage.Value > Me.Cboserviceinterval.Column(1) - 1 Then
msgbox "test"
end if
Now my problem what I can't get it to work . I still want the pop up message, if say the service interval is 12,000 and mileage entered in the vehicle mileage is 1,000 miles below the service interval I still want the same pop message but if 2,000 or more below service interval then no pop up message .
I have tried a number of sequences with no avail....
View Replies
ADVERTISEMENT
Oct 9, 2005
G'day,
I am using ACCESS to compare roles for users on our SAP system before and after a QAS refresh. I have two tables, one listing roles before and one listing roles after the refresh, how do I have to relate these two tables and what type of query should I run to present me with a list of roles that appear in one table and not the other, since I have two tables there may be roles in table a that arent in table b, as well as roles in table b that arent in table a. I need to see both these. I also dont want to see any roles that appear in both tables.
any help?
Russ
View 4 Replies
View Related
Aug 2, 2013
I'm currently working on a report to show the differences between two records (in this case, Documents). Each Document contains a number of paragraphs which are separate objects within my database. The purpose of this is to narrow down which paragraphs require reading (i.e. remove/highlight which are duplicates).
I've set up the report to show only the paragraphs from two selected documents (I don't think there is need for more than two, but how to select two or more documents for the query), and currently I have set the 'Hide duplicates' which kind of works but not the result I was hoping for - it only hides the related field and leaves the original in tact.
I am looking for a method that hides both duplicate records (not just the duplicated fields) if possible, failing that a method that will conditionally format the remaining duplicate or all duplicates.
Looks like the Hide Duplicates hasn't quite worked either - I have two fields which are clearly different and it has hidden the longer one. Likewise another later paragraph is not duplicated and it has hidden another which isn't duplicated. If it makes any difference the field is of type 'Memo'
View 7 Replies
View Related
Jun 1, 2005
Hello,
I have 2 fields that are supposed to have the same information for each record. I got the information from different sources, which is the reason for having 2 fields. I wanted to make sure that the information was accurate. Turns out, that some of it isn't accurate--all the fields don't match.
Here's a little example of what I have:
|___TITLE___|___ISSN 1___|___ISSN 2___|
|__TITLE 1__|__12345678__|__12345678__|
|__Title 2__|__22224444__|__23224322__|
|__Title 3__|__98765432__|__98765432__|
As you can see, the ISSN numbers for Title 1 and 3 match. There's no problem there. I want a query that would list all those like Title 2, where the ISSN numbers don't match. Then I'd have a list of all of the problem Titles, and I could look up the real ISSN numbers.
Thanks
-Siena
View 2 Replies
View Related
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
Aug 10, 2015
I'm trying to create a query that has a calculated field that shows a maximum value from multiple fields.
As far as I can find, this is not built into Access, so I've used this code from a Microsoft page:
Code:
Function Maximum(ParamArray FieldArray() As Variant)
' Declare the two local variables.
Dim I As Integer
Dim currentVal As Variant
' Set the variable currentVal equal to the array of values.
[code]....
The problem I'm having is, well this doesn't work for me.I'm a bit of an beginner VBA coder, but I understand this code and don't know why it won't work.It only displays the value from the field within the brackets.The values used are Dates, so I need to display the latest date from multiple fields.
View 13 Replies
View Related
Mar 8, 2008
Hi there,
i have a field called numbers - i need to throw a messgae box alert if the value within taht field reaches or is 5. I have records so if within any of these records if the number field contains say 5 then it should show john's number has reached 5. So it must read the first field name of that record and teh number field of the record.
I've been trying to use the macro tool - but no luck yet.
An start would be just to show that the number field has reched 5 without showing the first field record i.e. john not shown.
Anyone have any idea how i could do this.
View 3 Replies
View Related
Apr 7, 2008
Is there a way to show a message box if the user leaves the parameter for a query empty or inputs the number in the parameter in an incorrect format?
View 3 Replies
View Related
Nov 28, 2006
Right, my first access database is coming along well, with the help of some people on here, but I have another question. The database is designed to track jobs in our small workshop.
We have a 'price matrix', that has our regular customers on the left, the material type long the top ( mild steel, brass, etc), and a cost in each area for each of four types of standard job, so i suppose its a sort of a 'cube' rather than a matrix, except not all customers and materials have an agreed price for each of the standard jobs (there are only four of them, a maximum of 3 per customer)
Now, my database revolves around a 'main' table, with a unique order ID, customer name (from lookup table ), and other details. Initially, I have created another 'cost matrix' table, with a primary key, customer ID (based on the same lookup table), material type and job type (both lookups), and price fields. What I want to do is that my guys can select material and job type, and the cost will be recorded somewhere. Now, I understand that you shouldn't have the same data twice anywhere in the database, so I figured of I am recording the material and job type in question on the main table, and given the customer ID is recorded as well, I should be able to reference this to my cost matrix table and then be able to populate a field on the main form, query against it on reports that sort of thing. However, there is a field on my main table for cost adjustments ( say we work 24 / 7 on a rush job), which is manually entered on a job by job basis, so should I record the total job cost in my main table, or always calculate it when needed using a unit cost + adjustment type of calculation?
Also, how do I populate the field on the main form that the cost should be 'x' from the'cost matrix' table, given the values of the customer, material type and job type fileds?
All help greatfully received. :)
View 1 Replies
View Related
Oct 26, 2006
Hi guys.
I have a few problems with my message box.
1. How do I enable a message to pop up only the first time I click a save button on a new record in a form?
2. How do I run the following
Me.Home_Tel.Locked = True
Me.Student_Name.Locked = True
Me.Class_Enrolled.Locked = True
ONLY AFTER you click Yes on the message box?
After you click yes, it can be locked forever, but not before you click the save button or if you clicked No on the msg box.
3. For another command button, how do I disable it after you have clicked it, and not enable it again until after you enter some value into a text box?
My message box now:
Dim msg As String
'Ask user if they want to save the record.
msg = msg & "You cannot change Student Name and Course Enrolled after you save. Proceed? "
If MsgBox(msg, vbYesNo, "Warning") = vbYes Then
'Run the command
DoCmd.RunCommand acCmdSaveRecord
'Lock the following keys
Me.Home_Tel.Locked = True
Me.Student_Name.Locked = True
Me.Class_Enrolled.Locked = True
Else
Me.Home_Tel.Locked = False
Me.Student_Name.Locked = False
Me.Class_Enrolled.Locked = False
Exit Sub
End If
View 4 Replies
View Related
Jun 5, 2012
I have a form with fields that gray out or disable depending on selections. If you make selections that result in disabled fields and then save/close it, how do you ensure the fields remain grayed out/disabled when you reopen it?
View 4 Replies
View Related
Jan 6, 2015
I have a messagebox and want to know if it is possible that the messagebox give me a date as 15/01/2015 and not 15/01/2015. Using dailog box as messagebox
Code:
Private Sub Save_Click()
Dialog.Box "Tape # : " & Me.Tape & vbCrLf & "Sticker # : " & Me.Container1 &
vbCrLf & "Book # : " & Me.Book & vbCrLf & "Date send Out : " & Me.DateSendOut &
vbCrLf & "Date to be back : " & Me.DateToBeBack & vbCrLf & "OS : " & Me.System, ,
"Saving............."
End Sub
View 5 Replies
View Related
Oct 23, 2012
I have a split database with multiple users. Since I split the database, it runs slower than the unsplit version. I understand this happens. I would like to have a message pop up when the database is loading. It takes approx 2 mins to load. Users get impatient and start clicking. So, I wanted to have a message pop up to let them know it is opening.
I have the same problem with forms loading, I have 5 forms and each takes about 4 secs to load, so thought about a loading message there too.
View 14 Replies
View Related
May 6, 2013
I would like to only display certain fields on a form depending on a criteria in another cell. For example if some enters 4 in 'Schemes' it would display 4 data entry boxes scheme1, scheme2, scheme3 etc - is it possible?
View 7 Replies
View Related
Jun 2, 2013
I am in the of designing an access 2010 database for data entry. Is it possible to create a button on a form in which a prompt asks a user for which records to export. Then depending on the entry export specific fields (First Name, Last Name, DOB) to a specific excel 2010 workbook (setup) and worksheet (template)?
For example, if the user entry is 1, only record 1: First Name, Last Name, DOB is exported to the setup.xlsx (more specifically the template worksheet of the setup.xlsx). However if 2,3,4 are entered then records,2,3,4: First Name, Last Name, DOB are exported to the setup.xlsx (more specifically the template worksheet of the setup.xlsx).
View 1 Replies
View Related
Mar 30, 2014
right I have auditing system in my database that tracks any changes made to any records. it logs it on a separate table and i show it on a continuous form.
right my problem is that I have loads of check boxes and text boxes on my main form on the form that records the main form I have a field call "new value" this is a text box but if I change a checkbox on the main form it will show -1 or 0 in the new value field on the recording form but I would like it to say yes or no I have tried the following
Code:
Private Sub New_Value_AfterUpdate()
If [New_Value].Value = -1 Then
[New_Value].Value = "yes"
End If
End Sub
this only works if I enter -1 manually but the data is entered automatically after the record is saved on the main form ...
I have also tried on enter before update I get error but now I need it to change on new entry...
View 8 Replies
View Related
Mar 21, 2014
Trying to send out some reminder E mails using some dates that I've set up in text boxes but can't get it to work.
I've started out simple to get it working as I'm not familar with VBA
Code:
If Me![Planned Finish] <= [2days] And Me![Final Reminder] Is Null Then
MsgBox "YES", vbOKOnly
View 4 Replies
View Related
May 5, 2015
I'm after a piece of code which works as described below.
I have a save button on a form
I have a append query ready to run.
When the save button is clicked, I want the code to see if a checkbox is true or not and if its true I want the append query to run if its not then I want the form to save and nothing else.
View 1 Replies
View Related
Sep 15, 2014
I have a table (tbloutput) which has details of customers and which staff they have been contacted by.
What i want to do is, export the details from this table into an excel sheet using a template that i have set.
What i want to do is create multiple excel outputs using this template depending on the name of the staff. So each staff will have a seperate workbook which was created using that template. And i also want the new workbook to be named for that staff member.
So in short
Table exported to excel workbook and excel workbook named : Blabla staffname.xlsm
View 1 Replies
View Related
Jul 2, 2013
I created a form that applies conditional formats depending on a field. It works fine, until you enter data into one of the conditionally formatted fields, then all hell breaks loose. Conditional formats totally go away and the cells go to #error.
View 3 Replies
View Related
Aug 6, 2013
I want to display the text from one combo in a text box in another form based on what's selected in a second combo box. The text box is in a different form from the combo boxes.
Sub D_ComponentTypeCmb_Change()
If Me.D_ComponentNameCmb.Value = "Customise" Then
Forms!CustomComponentF!C_ComponentTxt.Value = Me.D_ComponentTypeCmb
Else
Forms!CustomComponentF!C_ComponentTxt.Value = ""
End If
End Sub
View 13 Replies
View Related
Jun 10, 2013
I have a form wich includes listbox of employees. When I click on them, it shows his or her data (date of birth,address,etc...). For every employee there are also three diferent checkboxes - if he is regularly employed, temporaly employed or student.So now what I need is to filter listbox of employees - only student or only regular or only temporar or all.I was wondering if I can do that with combobox, but I really dont know how. I am prety new to VBA.
View 13 Replies
View Related
May 21, 2015
I have a combo box with three columns, the first one is the bound one, the second is text in English, and the third is text in Spanish. Currently when the form is open, both the English and Spanish texts columns are visible. What I would like to do is set up a command button on a different form that will open the form with just the English showing in the combo boxes, and another button for Spanish. I've tried the following code which opens the form, but the combo box is disabled altogether.
DoCmd.OpenForm "frmEditar", acNormal, "", "", , acNormal
DoCmd.SetProperty "niv_gest", acPropertyColumnWidths, "0;1;1"
What am I missing?
View 5 Replies
View Related
May 14, 2014
i have the following code that hides 5 buttons depending if the user has permission which works fine.im trying to incorporate an IF statement if there is only 1 of the buttons visible then to automatically click the button. but if there is more than 1 do noting?
Code:
Private Sub Form_Open(Cancel As Integer)
Dim rsO As DAO.Recordset
Set rsO = CurrentDb.OpenRecordset("SELECT tblUserPermission.UserFK, tblUserPermission.CompanyFK, tblUserPermission.Permission " & _
"FROM tblUserPermission INNER JOIN tblUser ON tblUserPermission.UserFK = tblUser.UserPK " & _
"WHERE Username = '" & Me.txtName.Value & "'")
[code]...
View 3 Replies
View Related
Jul 25, 2005
Does anyone know a nicer way of writing this. I basically want the form to quickly check all the fields to make sure they are filled in when the print button is clicked, different fields need to be filled in for different print buttons so i used this which works but seems very messy.
Private Sub Command0_Click()
If IsNull(reg) Then
MsgBox "You must enter Reg", vbCritical, "Data Required"
Else
If IsNull(make) Then
MsgBox "You must enter Make", vbCritical, "Data Required"
Else
If IsNull(model) Then
MsgBox "You must enter Model", vbCritical, "Data Required"
End If
End If
Exit Sub
End If
End Sub
View 2 Replies
View Related
Jan 31, 2005
Hi everybody
It is my first post here :)
I have a simple (I hope :) ) question.
I have two tables in my database.
Tables are simple and the structure is the same
Tables contain some different and some the same records
I want to create a new table (or Raport maybe) which contains differences (different records which are not in both tables)
How can it be done in the easy way?
Sorry for such stupid question but I have tried to find this forum for similar issue with the easy solution but no luck.
Thx for the reading
:)
View 2 Replies
View Related