I'm trying to find a function in access that could do the following:
ZAB103-3012
ZAF405-HD-0001
Turn those cells into:
AB103
AF405-HD
Pulling everything to the right of the Z in the last step is the easy part but I can't figure out what function would be able to find the last "-" in the cell and pull everything to the left of it.
Code:INSERT INTO [Status Log] ( Status, Edit_Date, Event, Claim_ID )SELECT [Status Lookup].Status, Now() AS Expr1, "3rd Party Denial" AS Expr3, [Claim Report Info].[Claims Header].Claim_IDFROM [Status Lookup] RIGHT JOIN ([Claim Report Info] LEFT JOIN [Status Log] ON [Claim Report Info].[Claims Header].Claim_ID = [Status Log].Claim_ID) ON [Status Lookup].status = [Status Log].StatusGROUP BY [Status Lookup].Status, Now(), "3rd Party Denial", [Claim Report Info].[Claims Header].Claim_IDHAVING ((([Status Lookup].Status)=[Forms]![claiminformation]![ReportForm]![reportstatus1]) AND (("3rd Party Denial")="![claiminformation]![ReportForm]![txthiddenvalue]") AND (([Claim Report Info].[Claims Header].Claim_ID)=[Forms]![claiminformation]![ReportForm]![Report_ClaimID]));
here is my current query. i'm trying to append data to a table from my form. "![claiminformation]![ReportForm]![txthiddenvalue]" but since it's my value from txthiddenvalue isn't anywhere in my query how do i get this to work?
Hi folks, I have a table with the words "Church of (whatever)" in one of the records. I am attempting to do an update query to remove the "Church of" part but leave the remaining part of the string. I am using a combination of Format and left but am not having any look. Any suggestion are much appreciated. Thanks Colin.
I have a bunch of server names that have names like aaa.bbb, xxx.yyy. All i need from these server names is the name before the first "." so in the first example all I would need is aaa. I've been using this formula in excel MID(A1,1,FIND(".",A1) - 1). This works great.. Is there any way to do this in access?
Sorry if this has been asked before but I have searched and couldn't find an answer
I have a string that is set on startup (username) and have another form(hidden) that loads on startup this form contains information on what forms and options the user can access. Just having a little trouble using the string to pull the correct record, the information in the string would be from the primary key field on the table.
I have a text field in a Table and on a Query called "Notes" In that field that has data like below:
[04/02/2015:BD] Project is to be assessed by Solutions Planning [03/27/2015:BD] Project prioritized [03/14/15:BR] Entered to system
Im trying to find a way to pull just the most recent line of text, in this case
[04/02/2015:BD] Project is to be assessed by Solutions Planning
into the field next to "Notes" or wherever - an empty field in the query. I searched around, found some stuff and I was thinking of having the code look at the first "[" and count the length to the next "[" and pull out whats in between. Looks like the bracket causes issues in the module.
and I'm trying to pull the max value of the number after the -e- for a given set of them. In this example, I'd want to return the number 70. I'm then going to use that to create the next ID and populate another field.
The IDs are not used as the primary key. And while the previous IDs used leading zeros inconsistently, new IDs will not have leading zeros.
Here's what I have so far, but it doesn't seem to pull the number after the -e- at all. I think this section here is the problem, even though the same logic works in a query:
Code: Public Function MaxArticleERef(hbID As Long) As Variant On Error GoTo err_handler Dim db As DAO.Database Dim rs As DAO.Recordset Dim strSql As String Dim maxERef As Variant
I have a criteria in a parameter query that asks the user to enter a Subsystem number (such as 4596-666-001). The source data for my database has Systems (e.g, 4596-666) and each system has several Subsystems associated with it (e.g, 4596-666-001, 4596-666-002, etc). The System and Subsystem numbers are stored in the same column of the source data spreadsheet, and hence the same field in my database.
The source data is structured in such a way that Systems and Subsystems have different information. I would like to set up a query that shows the System information as well as the Subsystem information.
For example, if the user enters 4596-666-001 into the parameter dialog box the query returns all the information for 4596-666-001 and 4596-666 (but NOT any other Subsystem).
As a work around I have set up an OR situation where the user first enters the Subsystem number and then another parameter query dialog opens and they enter the System number. This works but is not as nice as simply entering the Subsystem number and having all information returned.
Is there a way to set up my query so the when 4596-666-001 is entered an OR is generated using the first 8 characters of the Subsystem number?
I have a 3rd party database where I have no control over how the data is entered. I've been given the task of creating a Crystal report that would need to gather data from two databases. The link between the two databases in my report would be on a quote number. In one database, the quote number is in it's own field. In the 3rd party database, the quote number is stored in a memo field along with other data. Here's an example:
The data I'm after is C7875 T7761 T6895 T7152A *No data from the 5th row since the data after the "T" isn't numerical
So far I'm thinking of using an IIF statement to check for the existance of a C or T, then if true, use a nested IIF statement within the first to check for numeric, if true, use the Mid function to pull out the quote number.
My first concern is this could become a complicated IIF statement and was wondering if there was another direction I should be looking in acheiving this.
My second concern is if I go with this method, some of the quote numbers have a space after them, some of them have no space after them, some may even have a "/" after them. How would I go about accomplishing this?
I have a manual date format that looks something like:
02/16/2015 09:06:15 AM PST
I would like to truncate the text so that just the date is showing. For all that I have found, I can remove a string from the beginning? any tips on removing a string from the end?
I have a text box and currently this is my control source
="Testing " & [test]/3 test = 1000 so my text box reports: Testing 333.333333333333
Is there a way to make it into a form like $333.33...Also is there a way to make [test]/3 come out in a money text form? like "Three hundred thirty three dollars and thirty three cents.
I have what I think is a difficult problem to overcome...
I am designing a form to create an invoice. The user will select a workstream and a date range in form frmInvByHrs. Within this I want two sub-forms, one is frmInvByHrsTsht and the other is frmInvByHrsBill. I want the first one to display all the staff and their hours done, and the second one to be in data entry mode where you can enter the hours you want to bill. Each sub-form is based on a separate query.
Is it possible to do this? ie. to have one sub-form in data entry mode, and the other not? It seems to me that the data entry mode is controlled by the MAIN form regardless of the sub-form settings!
If this is not possible, do you know how I can acheive this?
I have refined my query from previous threads to involved a module function. This calculates more acurately no of working days between dates and takes into account a holidays table. (All credit to Arvin Meyer on the module:) ) However because the Leave Year starts at the 1 July and finishes 30 Jun I need to compose the date for any current year Year(Now())
Enclosed scrdmp shows my query design. I can easily get it to work as you see it, but obviously as each year rolls over, the year needs to change.
Have looked at many posts but can't find what I'm looking for. This one will get me over the hurdle.
i have a table of articles. A field in the table is ArticleSubject
the ArticleID is made up of 3 letters then 3 numbers. i want the 3 letters to be something according to the subject for example i want the first 3 letters of the ArticleID to be MAT*** (* is a number) if the subject is Maths or ENG*** if the subject is English
the subject is picked from a listbox in the same record
how would i do this in a table . i am reluctant to use append or update queries. but will do so if its the only way.
I was looking for some help. I am trying to setup a table with a field for web address. People are entering www.website.com etc however I need them to make sure it starts with http:// Is their any way I can put validation on the field to make sure that this is entered? Or maybe I could use an input mask?
Hello! I have "ID" column and I want to create new column called "ID_new" where the value of each record should be "1000" plus the value of "ID". For example: First record, has "ID"=1, than I want "ID_new" to become = 1001 Second record, has "ID"=3, than I want "ID_new" to become = 1003 etc..
Not sure what I should do here. I would like to have a cell populate with the value of a specific cell previously. explain: in excel, we can use formulas like this:
A1: 00:00 B1: 08:30 A2: 08:30 B2: 13:00 A3: 13:00 B3: 15:00 etc, etc Notice that each cell in A is the same as the previous B Cell. So the formula for Cell A2 would be something like: =IF(B1>0,B1,"00:00") and Cell B3 would be =IF(B2>0,B2,"00:00")
The fields I have in Access are:
TimeIn TimeOut
So I would need to get TimeIn to be the same as the previous timeout??? Not sure If I'm making any sense right now :)
I have a subform in Datasheet view. One field contains numbers. When entering data into the datasheet I wish to copy the number from the cell above and add 1. Can anybody help me with the code to do this?
This is a very stupid question, I'm sure... I want to get Access to find a cells that have a certain value and make them a particular colour so that they can easily be seen by database users. I could also make the font a different colour. I've tried getting the builder to do this in the query I run (for the column the fields appear in) but nothing seems to work. How and where do I enter formatting for colour / font colour based on data that is already in the cell... and what do I need to type?
Also would it be faster to get Access to do this before I run a query - so that the formatting is appllied to the whole table or would it be faster to do it during the query process?
I am not sure if this has been done in a table before. I have seen it in forms but not in tables.
Here is my problem. I have created a database for a planespotters club. This database has the tables. ac_logged ac_maker ac_model country airport
I am trying to display selected information in the ac_logged tbl that is related to other cells. For example: If someone selects boeing in the maker field they will only boeing models in the model field. Also, if someone enters Ireland in the country field only the airports for that country would be listed.
I don’t want to do this in a form but I could settle for a query if I have to.
I was just wondering if this could be done in a table as opposed to any other way.
Hope I have made myself clear on this one. :confused:
OK, here is my situation. I have an access database which is updated automatically every night with new data. My companies solution to this is each morning, the entire database is downloaded to my computer to be used by another application.
In one of the tables, there is a field that doesn't work for my purposes, so each day I have to manually open the table, and change the contents of that field for every record. For example, lets say I have the following table:
I have a mainform in which there is a subform. Is there any way that I can retreive the value of the selected cell of the subform in the main form? Currently what I usually do is that using a text box and setting it's control source to that special field in the subform, we have the value. But this is only for a specific field. To explain my problem more precisely, I have a subform with 7 columns (fields) and 5 or 6 rows (datasheet view). When I click with the mouse on a specific cell ( or navigate within the subform with the arrow keys) I want to have the value of that cell in my main form. Thanks in advance.
I have a program that brings in the upper and lower specs to a excel spreadsheet and then brings in the values from lab tests.
The program then uses the specs to determine if the value is in or out of spec and colors the value if it is out of spec.
My problem is that in one cell the upper spec that is brought in is 2.7 and it shows that on the spreadsheet but when you click the cell the true value stored there is something like "2.66990153". Since a test value of 2.7 is greater than that it colors it when it is in fact in spec.
I have stepped through the code and the spec value pulled from the table is coming in correctly at 2.7.