Macro Not Recognizing Text Box Value
Sep 17, 2011
I have a text box on a sub-form that you can double-click to bring up another form that filters records based on the value in that text box you double-click. It used to work, but for some reason, it's no longer able to find the value in the text box so I get that little pop-up window asking for the value of the field I'm trying to reference.
What are the possible causes for this?
View Replies
ADVERTISEMENT
Jan 14, 2015
what's wrong with this iif statement?
=IIf([Details]="COST OF PRODUCT",[PerUnit]*[Quantity],0)
it keeps coming back with 0 even when the text says COST OF PRODUCT
I have also tried:
=IIf([Details]="COST OF PRODUCT*",[PerUnit]*[Quantity],0)
=IIf([Details] Like "COST OF PRODUCT",[PerUnit]*[Quantity],0) =IIf([Details] Like "COST OF PRODUCT*",[PerUnit]*[Quantity],0)
I'm using the expression builder to create it in a total box in the report footer, I have a box that gives me the total of the report using a sum and I need to show the cost of product separately to this as I need to use it in another calculation.
View 3 Replies
View Related
Aug 22, 2005
Hi
I have setup a query from which I have setup a macro which exports the queried data to a .txt delimited file, does anyone know how I can stop it putting Quotes aroung each field and just leave the commas in.
Thanks,
Lisa
View 2 Replies
View Related
Oct 23, 2014
I am trying to complete a macro that starts with importing of a text file. However, when I go to complete the steps in the macro, I do not see the specs for the import file that i created. There is a dropdown with a few specs for me to choose from in the box titled "Specification Name" when I am completing the action titled ImportExport Text. However, none of those specs are the right ones.
When I go to "Saved Imports" I can plainly see the import that I am interested in. So is a Saved Import different than a spec? If so, what steps do I need to do to create the spec?
View 1 Replies
View Related
Sep 15, 2004
I have a form where the user inputs a date into a combo box and then selects a command button.
There are two options:
1. The user can select an exiting entry (by date from the combo box) to edit a existing entry.
2. to create a new entry they enter a new date (not in the combo box).
Then the user selects a command button.
The command button has an onClick macro where the value in the combo box is checked (IsNull([Combo40]))
If the "IsNull([Combo40])" is true a message box is presented saying the date field is blank.
The problem is (finally) if you enter a new date "3/3/04" and forget to hit the enter key the system doesn't recognize the entry, in other words the "IsNull([Combo40])" evaluates to TRUE.
We currently have the msgBox remind the user to hit the enter key but that seems a little low tech. Is there anyway to look at the field and see the data even though the user forgot to hit the enter key??
Thanks
View 1 Replies
View Related
Jun 11, 2013
I have a query that serves as the data source for a report. Previously, I had a unit cost value that the User entered as a parameter, but I wound up adding an unbound text box on my form so that I could validate the input before executing the query. So now, the parameter is coming from a form. The text below is from my query, but Access still pops up with a parameter box as though Expr3 is undefined.
Expr3: [Forms]![BridgeRptsF]![CostSF]
I have verified that the field name on the form is correct, and whenever I try to run the report, I do it from the [BridgeRptsF] form and I make sure the CostSF field is populated. I feel like this is a pretty straightforward fix but I've not stumbled upon it yet.
View 13 Replies
View Related
Nov 8, 2006
Hello,
I am running a append query from a button.
In the query, I have set the OrderID criteria to:
[Forms]![sfrmOrders]![txtOrderID]
Whenever I try to run the query from the open form & subform, an Access 'Enter Parameter Value' window pops up.
I would like to use this Criteria for many different features in my db (SendObject, etc.), but I cannot find how to set the OrderID based on the current form.
If anyone can see what I am doing wrong, I would appreciate your help!
Thanks!
View 9 Replies
View Related
Aug 27, 2014
So I have a table "zztblArticles." Some fields should go to "tblArticles" and values in Tag_ID should go to a lookup table "tblTag" and a junction table "tblArticles_Tags." I'll explain the code I've written below:
Code:
Private Sub cmdSubmit_Click()
Dim db As Database
Dim strINSERT As String
Dim strVALUES As String
Dim rszztblArticles As DAO.Recordset
[Code] ....
The first loop through works fine, I get the records uploaded to all tables. The second loop through fails at
Code:
intArticleID = DLookup("ID", "tblArticles", "Sourcing_Date = " & !Sourcing_Date)
Because it can't decide which ID value to use. This is because the value has been duplicated in tblArticles after the code acts on the same record again. It has completely failed to move to the next record in the recordset, despite the .MoveNext before the Loop!
View 12 Replies
View Related
Apr 18, 2014
I am filling in a database using forms, and I would like to be able to add standard values to any field using a macro/VBA code I don't want to set up a different macro for each field though - I have around 40 different fields (to elaborate, it's a mark database for student projects, each field is a different thing I am commenting on. I want to quickly add 'Missing' or 'Good' to a field - but I also want the option of free text instead.).can't figure how to do it in MS Access.
View 2 Replies
View Related
Aug 1, 2014
I have a form for which the Record Source is a certain table. Then on that form there is a button to display another form, which adds a new record to the same table. Then the new form is closed.The trouble is, the original form cannot search for the new record, until you close the form and reopen it.I have tried using Me.Dirty is false, and also a requery of the original form, but nothing works. Only closing the form and reopening it will display the newly added record.What can I do to make the original form recognize the newly added record?
View 7 Replies
View Related
Jun 4, 2012
It is my understanding that a custom macro was built to pull text data from a file and import it into Access in the appropriate fields. This macro no longer works and will return the following error message:
"License information for this component not found. You do not have an appropriate license to use this functionality in design mode."
It only gives an option to click OK. When you do it shows a box called "Action Failed" that lists the macro name, condition, action name, and arguments with three button to click on the right of the box: "Step" "Halt" and "Continue". It appears that only the "Halt" button is available to be clicked.
Does this sound like an issue with the Access license or whatever license the macro might have? We're trying to decide if it's possible to restore the functionality of the macro.
View 14 Replies
View Related
Jun 18, 2015
So I'm new to Access, and I am trying use a query that can be referred to by a chart. So the idea is that I use the query to select data only from the date range that the user chooses on the home screen of the database for their chart (using the command Between [Forms]![Home Screen]![From] And [Forms]![Home Screen]![to])..Although it has been working fine for charts that only have two parameters, when I attempted to make a line graph that sorts by 3 parameters (i.e. date and amount for different types of something), it stops. I get the message that "The Microsoft Office Access database does not recognize [Forms]![Home Screen]![From] as a valid field name or expression" or something to that effect.I'd rather not remove the whole specification created by using the dates from the home screen, as it has been working fine on all other aspects of my charts and reports.
View 9 Replies
View Related
Oct 25, 2014
Access doesn't seem to recognize the values in a table I am updating. I am using an update query to revise prices in a column Titled "Price". I am comparing the prices in the Price column to the prices in another column with a simple IIF statement (i.e., IIF([Price]=[Column2Price],"Yes","No"). However, oddly, the formula produces a "No" result, even when the prices are plainly the same values, and all formatting for both columns is the same. Whenever I manually type over the price with the same value, the formula works and Access seems to work as intended. For example, I simply type "12.95" over the same value that is displaying in the column that I updated that is already showing "12.95". Then, after I do that, the formula works and produces a "Yes" value.
View 3 Replies
View Related
Dec 8, 2013
I am trying to write a more complex macro that will start another macro at a preset time, however I am getting stopped at the first hurdle - getting a macro to run another macro.
Here is the code i am using at the moment, all I want to do currently is click the first button, then get the second macro to execute. But no luck, getting error 2157 "cannot find the procedure"
Code:
Private Sub Command3_Click()
MsgBox "1st macro running", vbExclamation, "Note"
Application.Run "teststart1"
' Application.OnTime TimeValue("19:55:00"), "teststart1"
[code]....
View 1 Replies
View Related
Dec 5, 2005
Hi.
I have a macro (that runs a bat file) that I would like to run for the first time ,and only the first time that a form is run. The bat file will then copy over certain files the db needs.
Is this possible?
Thanks.
Frank.
View 1 Replies
View Related
May 19, 2005
I have a database and in order to get the correct values you need to run a few queries/make tables/delete tables ect. I was wondering if there was a way to code something so that on command click button it would run through all the neccessary steps so people dont have to manually do this.
View 1 Replies
View Related
Mar 31, 2006
Hi,
Here's a sample of the database that I'm working on. I'm trying to help teachers take attendance of all of their students and so have the following tables.
tblAdmin - List of Teachers and their IDs
tblAttendance - Courses, Student IDs, the Date and the Status (tardy, etc..)
tblCourseInfo - List of Courses and the Teachers teaching the course
tblEnrollment - List of the Courses and the students enrolled in them
tblStudents - Student IDs and their names
The form that I want is a "Course Information Form" that will
(1) Display all the students enrolled in their course
(2) Allow the teachers to take attendance everyday while keeping all the previous records
I've attached my sample database. I really appreciate ANY help any of you can suggest.
Thanks :)
View 13 Replies
View Related
Feb 27, 2006
I am running a Macro that is running 3 query and saving inbetween each query.
My issue is that when the macro runs I have to hit ok when the message boxes pop up saying "its about the run a Query" and then again when it says "your about to update the records". These two messages occur for each query and save. So I have to hit OK 6 times
Is there a way I can set the macro to NOT show these message boxes?
THanks in Advance
View 9 Replies
View Related
May 2, 2006
Hi all,
I usually search for the answers to my problems, but as im not sure what the problem is i havnt been able to do so here.
Basically i have a pretty simple database, it works fine in the UK. The company i have designed it for are moving to Budapest, i have just had an email this morning saying an error message pops up when the try using a form, i have attached the message. The macro just runs a query based on a table in the database asking the users to choose a record number edit. Im assuming it must be something to do with is being used in Budapest as it works fine here, but they are accessing it the same as they would do here, just from a different location.
Any help would be appreciated, thanks
View 5 Replies
View Related
Dec 2, 2006
I use an autokeys macro to allow users to openforms with a hotkey directly without going through the menu system.
I would like the users to be able to modify their own setttings for this, but I could not find a way of writing to the macro autokey table.
Anyone know of a way?
View 4 Replies
View Related
Jul 30, 2007
I have a program thats work perfectly in some computers useing the network but when i try to open it in other computers i get an error and when i try to debug the error it highlit the line that i am calling the micro that open the mainform in it, i hope some one have an idea for what is going on with the program
View 12 Replies
View Related
Dec 3, 2007
Hi,
Task: to extract data from table 1 of a database (tied to form 1) to create a record in another table 2 of the same database (tied to form 2).
Besides, I need to make it simple to use for an end user.
On the form 2 I have a command button that activates macro. Macro makes a query to run and extract data from table 1 and append a table 2.
Now I want the user to see the record on the screen (form 2) that has just been created. For that purpose I add "go to last record" step in the macro.
Problem: that doesn't work. :) For some reason it brings back same record from the middle of the table which is not the last. And what is even more interesting is that it doesn't tie to the record ID on the bottom of the screen (access generated).
Challenge: the record ID field in the table 2 is a primary key auto-numbered field (i know this is not perfect but I am not the one who created the database) and some records have been deleted over time. Might that be connected to that or that is something else?
Thank you!!
View 1 Replies
View Related
Jan 11, 2008
I have inserted two combo box in the form with lookup in the table. Now I want to select values in these boxes and filter the records having those values on click of a command button placed on the form.
How can it be done without using VBA? Is it possible with use of macro?
Kindly guide.
View 2 Replies
View Related
Mar 25, 2008
I hope you might be able to help.
I've managed to successfully setup my first Access database.
I have imported data from Microsoft Excel into an Access Database and Table within that (EmptyHomesTable).
The data relates to empty properties and every month at work we receive a list of empty homes in the month. Every month, this new data will be imported into a TemporaryImportTable.
I am then running an update query to compare the data in the EmptyHomesTable with TemporaryImportTable and 'close' those which are no longer empty (i.e. update their status in the EmptyHomesTable if the account reference number doesn’t match).
I am then running an append query to compare the data in the EmptyHomesTable with the TemporaryImportTable and add any new empty properties (i.e. add those which aren’t in the EmptyHomesTable by looking at the account reference numbers and adding them if they don’t match).
This gives us a working database of empty properties but doesn't delete those which are no longer empty (rather they are marked as closed).
What I'm trying to do is to run a Macro to automate all of this on a monthly basis.
Macro is as follows:
1. Delete Query to delete the data in the TemporaryImportTable but keep the table structure;
2. TransferSpreadsheet to import the latest Microsoft Excel file into TemporaryImportTable;
3. Update Query to close properties which are no longer empty in EmptyHomesTable;
4. Append Query to import those new empty properties in EmptyHomesTable;
The macro almost runs fine but I have a couple of questions to help finish it:
a).I’ve run the macro to update the February list to the January list which works fine. Running the macro to update the January and February list (combined) is almost fine but I’m 2 entries out. I can’t manually check as we’re talking about 1,500 entries. Is there another way?
b). Is there any way for the TransferSpreadsheet query to ask at each time of running the macro for the location of the Excel spreadsheet or do I need to go into the macro every time and change the file location?
c). One of the fields in the table is empty date (i.e. the date the property became empty). Is there a quick way to filter the entries before a certain date (i.e. only show those empty before 30 September 2007 for example)?
Thanks for your help.
View 3 Replies
View Related
May 17, 2005
Hello,
I have a procedure which I undertake and wonder whether it can be automated in any way.
I have a field on a form for Purchases (frmPurchases) for a Purchase Order number. To get the order, I click on a command (cmdpo) which opens another form and clicking a command on this form (cmdgetpono) produces a unique Purchase Order number. I then manually copy the number given and paste it into the field on frmPurchases (PONo).
I have not used Macros before but cannot see that there are the options to achieve this. If someone could suggest the ones I should uses fro the list it would be appreciates.
Alternatively, is there another way of looking at this?
Thank you
Lin
View 2 Replies
View Related
Dec 14, 2005
Hello,
I have a button that runs a macro to delete records in 12 tables. I want to create a message box before that macro runs warning that you are deleting records in 12 tables and are your sure you want to run the macro.
I need a message box with an ok and cancel button. Where do I put the msgbox funtion in this code?
Thanks !!
This is my code:
Private Sub cmdRunDeleteMacro_Click()
On Error GoTo Err_cmdRunDeleteMacro_Click
Dim stDocName As String
stDocName = "mcrSemesterStartRecordDELETE"
DoCmd.RunMacro stDocName
Exit_cmdRunDeleteMacro_Click:
Exit Sub
Err_cmdRunDeleteMacro_Click:
MsgBox Err.Description
Resume Exit_cmdRunDeleteMacro_Click
End Sub
View 5 Replies
View Related