having a problem with a query, its used to export data to a txt file for another program.
the problem is i have a field that i format with end of line chars between entries in the field, so in access it looks like a few entries rather than one field (there were reasons for this).
when it comes to export this data, i need to remove the end of line chars with spaces.
heres the part of the query i need to fix: Description: IIf(InStr([Order_data].[Stock2],Chr(13)),Replace([Order_data].[Stock2],Chr(13),Chr(32)) & Replace([Order_data].[Stock2],Chr(10),Chr(32)),[Order_data].[Stock2] & " " & IIf(nz([Order_data].[Stock3])<>"",IIf(InStr([Order_data].[Stock3],Chr(13)),Replace([Order_data].[Stock3],Chr(13),Chr(32)) & Replace([Order_data].[Stock3],Chr(10),Chr(32)),[Order_data].[stock3]),""))
yes that is nasty.. but simple to understand. 2 fields get combined for output (stock2 and stock3), i check first if they need to have chars replaced, then replace if necessary. the output i get though doesnt seem to be replacing the chars, it finds them there with the if however.
hi there, im working on a project for the boss but i've come across a couple of problems first, i'd like to know if there is a way i could search for a specific string of characters inside a field, for example, search for a 'malouf' in the name field (without having to reclassify my fields separately as first name and last name). i've tried the LIKE command, but it doesnt work the way i'd like it to.
And other question, i would like to create a validation rule for a field in an entity, but it is based on whether or not a record was in a query result. specifically, my validation rule is that i cannot put in a particular TruckName in the Truck entity if in my query "Unavailable trucks", that particular TruckName is listed there. Ive tried so many IIF commands but i dont really know what to do. thanks a lot guys!
i want to display time remainig on my quiz form say quiz has a total time of 15 mins so i want to show the time on my form so the user know how much time he/she got
i did search th eforums but couldnt find any sorry if it is here already if it is can some on epint it for me thanks in advance
I want to use combo box to select the resources to assign, but want to only show the remaining item, each time I click for new record.for example staff allocated for different jobs.
seat assigned to each person, so each time the free seats only be displayed in the list, Not the already assigned.
Hi, I have never had to do any maths with access before, so I don’t know where to start!
What I need to do is calculate remaining warranty information for products.
In the table I have 3 columns. the 1st column is "Purchase date (dd/mm/yy)" 2nd column is "Total warranty period (years)" and the 3rd column is "Remaining warranty"
The 3rd column is the one that will display how long is left to run! How do I achieve this?
I'm trying to step from Excel to Access and I have some issues to translate functions that I used in Excel to Access.This is how it looks in Excel.And I have issues to translate the following function in Excel to Access.
=IF(AND(I6=0),"Done",K6-A$4)
A$4 is related to cell where it states the function =now() Basically what I want is to calculate in the tablecolumn is the following.In the column "Days remaining" I want the remaining days from "date to pay" and today. If the amount states "0" then the outcome must be "done".
I have a database being used to track and bill therapy units. I have a table that stores the pre-authorizations that tells me within a [start date] and [end date] I am limited with X amount of units (that is all the client's insurance and/or funding source will pay for within the time period). I also have about 4 different codes I can be authorized for which is also stored in this table - each code a separate pre-auth record.
Another table is where I enter in the type of therapy (service code) I've completed with the client. I put in the Service date, start time and end time and it will automatically give me the amount of units to bill (1 hour=1 unit). If I happen to choose a code or enter in a service date that does not match up with a client's pre-auth (Service date is between start date and end date and matches code from pre-auth table) I have a simple text box that says "No auth for this code or service date" due to an IIF statement in a query. I'd like to take this a step further and give me the remaining units for the pre-authorization left when it does find a match.
What is happening is when it finds the authorization, it's not taking into consideration all the services I've done for that time frame. For example: I have a pre-auth from 12/1/12 to 1/31/13 for code 90806 for 12 units. I served the client for that code a total of 10 units thus far. I can't figure out how to link my 4 service records dated 12/3/12 (2 units), 12/16/12 (4 units), 12/27/12 (2 units), and 1/3/13 (2 units) to add together and then subtract from my auth for 12 units. I know the dates are the key but I'm lost.
I have a query call courses and field name expiry date I have add additional field within the query to show how many day left and how many days over the expiry date
Code : DayLeft:[expirydate]-now()
but i just get a error when i run the query
I also would like to ask is this possible to be done within the table e.g adding another field dayleft and some how add formula to calculate number days left or over due .
I am trying to create a parameter query to return dates that have 2 years remaining.
For example I have dates for when mortgages expire, and I want to recognise the dates that have two years remaining using a parameter query but I can't figure out if I use DateAdd or DateDiff.
I have a report that displays maybe about 4 columns that read data and if a columns reads zero then I have a code where it will hide, but my problem is that I cannot get the columns to move over once the column that is zero is invisible.VBA code that will hide a column that has zeros and move over the remaining columns so that when the report is ran it will not show just an empty white space.
I am in the process of (attempting) to develop a database and application for Parking & Violation Management. I have two tables at this point: "Parking Registration" and "Violations" that are linked by a "Permit #". I have developed a form that will allow the officer to enter either the "Permit" or the "Licence Plate" of a vehicle to run a "Vehicle Check" query to produce specific information for the vehicle in question; which is what I wanted, kind of... The problem is that the resulting data pops up in "table" format, and contains multiple fields, making review of the data difficult due to its lengthy, linear nature. Is there a way to have those results appear in text boxes either on a separate form or the "Vehicle Check" form itself?
In form (datasheet) I have a three columns "RightColors", "LeftColors" and "AmountOfColors"
I want to do something like this:
If I fill 'RightColors' "red;green;blue;", and fill 'LeftColors' "orange;" then in 'AmountOfColors' column should be "4". Sometimes I can fill only 'RighColors' or 'LeftColors;
I think I should add code in after update event. Is this possible to build code which can count colors using ";"? I need loop for this, right?
I need to count all values after "0" or null value of a rows in query of a table.I have attach Table.gif..Actually in need to get the duration of debts continue of a supplier as following sample.
2) If I move rst to last position, number of recordcount is correct, but! If there's no record in my string I get an error that rst can't move to last position.
2) If I move rst to last position, number of recordcount is correct, but! If there's no record in my string I get an error that rst can't move to last position
I have a terrible skill in this but I am doing my best to find ways. But I am running out of time in the development stage. I have the following form and table:
Tables: Eqpt EqptHistory
Forms: frmEqpt frmHistory
frmEqpt is the Mother form and frmHistory is the subform connected thru eqptID. Now what I want to do is count the records in the frmHistory and Locked the fields for editing. If it is new records, the fields will automatically unlock.
How do I do that because I can't find a way to count the fields with records and lock them.
I have loads of projects in a table, they all have a status (eg Red, Green, Amber).
I have a query for each so if you run qry_RagRed, it will show in a sheet all Red projects and obviously have a total in there.
So I have a form which has buttons on it for navigation, what I want is to display various things on there so for example, a field that simply has the number of red projects, or green etc.
All I want it to do is tell me a number based upon number of items in a query.
a table which has several fields (ProjectID, Name, PM, Category, Date, Tester).
I am trying to find a way to count how many of the fields have been filled out and how many are null for a particular Project ID.
For example, ProjectID=27 has a Name and a PM but no more data so when I load the form I want the db to tell me 3 of the fields have been filled out for this project. This way I can calculate how many are empty (3 in this case)
I have a form that could have duplicate material descriptions , is it possible to have on that form a field that counts the number of line items for that material and when the material changes the new number will appear .