Hi all!
This is kind of a philosophical question :)
I’m doing some changes to a “CRM”-database, and need to make a function that changes values in several records in one operation. The problem is, I have now idea on how to approach this problem.
One example; I have made a simple invoice function in my db, which works well. But now I send a lot more invoices then when I made the function. I’ve made a form, which prints the invoices, and I can print several in one “operation”. How can I, in the same operation, also change the status of the invoice record so that it says “Printed”?
If you have any suggestions on the method e.t.c.? Thank you!
(I'm using Access 2000)
I have a travel time database that should tally the number of minutes traveled and convert them into a time (hours and minutes). I, however, am having difficulty converting the numeric values cleanly. Is there anyway to convert 102 minutes + 100 minutes + 110 minutes = 312 minutes to 5 hours and 12 minutes cleanly? I need to take averages of time traveled and hours worked but cannot do this correctly. Thank you for any help in advance.:eek:
I think my subject heading explains it. How would you add or subtract two short time formatted values and produce a short time value? Also, how would you change a short time value into number minutes. (i.e. 5:30 into 330) Thanks!
I'm trying to determine the SQL to return only those records in a table which have duplicate values in each of two fields, but different values in a third field. Here's an example:
Code:
AcctNum FoodType FoodClass ------- -------- --------- A123 Apple Fruit A123 Apple Fruit A123 Grape Fruit A456 Potato Vegetable A456 Potato Perishable A789 Carrot Vegetable A001 Banana Fruit
For the above table, I'm trying to return records which have multiple entries for AcctNum + FoodType, but DIFFERENT values for FoodClass. So for the above table, the query would return:
It returns these two records because there is more than one record with for the AcctNum + FoodType (i.e. 'A456' + 'Potato'), but DIFFERENT values for FoodClass (i.e. one record has 'Vegetable' while the other has 'Perishable').
Ok... we're looking to take some values from our current form (hence the first 4 lines) and put them into some form elements on the new form... the form opens (the OpenForm command's going through), but when we reach the last line we get a "cannot find form XXX" error... so how do we change the elements on the new form?
I have a form and I want the dates to be displayed based on predefined time. In this case, I want my form to show present date from present day's 7:00 AM to next day 7:00 AM.
I have a form where I am capturing StartTime and EndTime of certain events. I have set the input mask as 99:00 >LL;0;_
My users think it is too much to enter am or pm. What they want is the system to calculate the am pm based on the time entered.
If the time entered is between 8:00 to 11:59, the system should save it as 11:59 am and if the time entered is between 12:00 to 7.00, the system should save it as 7.00 pm.
I have a query that looks through a table and shows me any calls that have a status of either 'O' 'or 'C'. What I would like to have in the query result is the O or C replaced with the words Open or Closed. Then when my count will make alot more sense rather than having O 29 etc.
I have had a look through the forums on the net and I am convinced this question has been asked before, but I am struggling to find the key word to search for
I have a form with a sub, and that sub has a sub. I'm on the first sub trying to change the rowsource of a combo box on the second sub, and none of the following want to work.
Access 2010. I inherited a database that I need to copy and get it ready for next year's data. There are several places in the various tables where the default value on a field is 2013. I need to change to 2014. Any vba code or macro that I can do this without opening all the tables to change the values?
hi there, I'd like to ask the solution for my problem. I made a new project using ms access 2003,crystal report 9, and visual studio 2005.
I just made a simple access dbase with 1 table(Table 1) and protected with password, o I forgot this table has 2 field(id and desc). After that I made simple report that using DAO connectivity(save data with report option is disabled).
At last I made simple program(windows app) using visual studio 2005. I put the CrystalReportViewer component, and these is the code :
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms;
namespace prj { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
and the problem is when I move the access database file to other location, the viewer shows a box to be confirmed by my UserID and password, my question is how must I write in the program so that the box doesnt come out.
I have created a table called - "Test" The properties of the table is listed below
Table Name: Test Field Name: ADMDAT2 (Text) DISDAT2 (Text) Operation Date (Date/Time)
I have written a query to populate a field where the Operation Date is between the ADMDAT2 and DISDAT2
Expr1: IIf([ADMDAT2] Is Null,"",IIf([Operation Date]>=[ADMDAT2] And [Operation Date]<=[DISDAT2],"Match"))
Unfornately it returns and ERROR message... I believe this may be because, the data type of the field, matching a Text with a Date/Time, I have rerun the query using a sample table where all the fields are Date/Time, and it work perfectly.
What i need help with how do i convert a text field into a Date/Time in a query?
So i can place that in the query before i populate the Test table. therefore it all should be date/time
I am needing to design a form that allows a user to add or overwrite a number of records by copying and pasting the information from an Excel Spreadsheet, however one of the problems is that the information being sent has times stored as text - so, for 04:45, it is simply stored as 0445 on the spreadsheet.
Is there a way to have these autocorrect once pasted into the datasheet?Also, is there a way to make a datasheet form that copies a number of records into itself depending on a user selection? The basics of what I am trying to achieve is:
I have a number of services that operate on a number of services (public transport), each vehicle has a unique identifier (Bonnet), and each place in the schedule has a unique identifier (RunNo); there are different schedules for different day types (Saturday, Sunday, Monday, Tuesday to Thursday, Friday and so on), and the times that each RunNo goes out and comes in differs depending on the day type.
At the moment, I have a table which has the following fields:
ID (Autonumber, PK) DayType Route RunNumber TimeOut TimeIn
My idea/hope is that a user will be able to open a vehicle allocation datasheet for the day, select the day type (lets say, Saturday) which will then populate the relevant number of rows with the schedule information (looking at a Saturday, that would be 128 rows), and then a blank column to add to the records a vehicle ID that is being used for each RunNo for the day.
Now, on top of all this, I need to also cater for vehicles being substituted during the course of the day - - - if one breaks down, it will have to be de-allocated from the list (so presumably by changing the TimeIn to the current/actual time rather than the scheduled time) and the user will need to be allowed to add a further row to show which vehicle was used next against that RunNo.
Just to further complicate things, there is quite a number of vehicles that will have a time in which is in the following day (ie after midnight) - whilst this isn't a problem in storing the times, I also want this table to be looked up to determine whether a vehicle is currently allocated or not.
The fields for the AllocatedVehicles table are:
ID (Autonumber, PK) RunNumber Bonnet Number DateOfService TimeOut TimeIn
It is hope that all of these with the exception of Bonnet Number can be populated by selecting the day type?
Objective to have a report generated from a query (Based on a Storage Table) in the record-source however need to make adjustments to each record based on the query output ie User Id is outputted as number as it needs to be for everything else but on the report loading needs to run an sql query on that ID number to get the name and then replace that value with the name and so on for each record and each appropriate column
Problem:I can either change All of the records outputted with the first records info or nothing at all. i need this process to occur individually on each outputted record
I am working on a school database, today I am working for fee collection form and I am facing trouble.In attachment At the top right area the hidden field I would like here changes according to selecting Fee Type under Fee Detail. I want to achieve this,
If feetype is ABF then Hidden field = 1500110 If feetype is ASF then Hidden field = 1500120 If feetype is EXF then Hidden field = 1500130 If feetype is MTF then Hidden field = 1500140 If feetype is RBF then Hidden field = 1500150
How I can perform this ?
Table structure is (tblstudents) Contain students data (tblFee) Contain, Student Id linked with student table, month, year, amount, date, narratives and FeeType that looup values from FeeType tbl, this hidden field also in tbl fee.
The codes that are 1500100,1500120,1500130
These are necessary for GL entries that's why I must have it on my form. I had as well apply method of Default value but in that case I only present only a single value, but I want that in hidden field values take changes according to the fee type.
I have an Access 2010 application running on Win 7 Pro which connects to a Back End SQL Server database. I am trying to get Access to synchronise the client pc system date & time with the Sql server date and time. Please note, the date/time does not necessarily have to be correct, it just has to be consistent between the server and all the pcs running the Access application.
I have tried two methods as follows. But both only work if Access with Administrator privileges, which isn't really practical.
Method 1:
Code: Dim MyDateTime As Date 'Some Code here to get MyDateTime If MsgBox("Change date & time to:" & vbCrLf & vbCrLf & MyDateTime & "?", vbYesNo, "Change") = vbYes Then Date = DateValue(MyDateTime) Time = TimeValue(MyDateTime) End If
Method 2:
Code: Private Type SYSTEMTIME wYear As Integer wMonth As Integer wDayOfWeek As Integer wDay As Integer
I have a routine than has been working perfectly up to now. My save routine was called by clicking a Command Button called cmdAdd.
I tried to change this Command Button to a toggle button by deleting it then creating the toggle button, naming it cmdAdd and clicking on the event property to link it to the existing procedure. PS It is an UnboundForm
BTW, I've done this for several other commands without a problem but with this particular case I get the following error
Run Time Error 2115.
The macro or function set to the Before Update or Validation Rule is preventing Access from saving etc."
It seems likely that I need to do something to the toggle properties.
It allows the docmd.save but still says "You must save the current field before you run the Requery action"
The system is looking to save/update and something is stopping it. Funny though that this doesn't occur with Command Button
I have tried decompiling, compact and repair, commenting out every line that involved updating a field or variable (Except for a recordset operation that does correctly do the updates required)
BTW the Toggle button has no Before or After Update events - Only the On_Click
How to control the below message to something like this through VBA:
"The Job: " & JobNumber & " already exists in the table." or to open an alternate form where they can make the change. Allowing duplicates is not appropriate for what I am trying to accomplish. I just want a friendly way of rerouting a user to understandable answer.
instead of this:
"The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."
I'm trying to sort and filter a continuous form. I want to sort by descending and ascending, but I also want to have a combo box for filtering. For example, there a combo box for sorting with Value List as the RowSourceType, the list would be "Ascending" and "Descending", and there should be another combo box to choose the field to be sorted with RowSourceType as Field List from a query.
My field names are: "LastName", "FirstName", "MiddleName". But I want them to appear as "Last Name:, "First Name", "Middle Name". I want to be able to change the display of the field names within my combo box which should come from my query. How is that possible? I already tried to put caption in the properties but it didn't work.