I made a table with a Date and Age field. If I have typed in 12/14/04 for the date and 25 for the age in the first record, how can I make Access display 12/15/04 and 26 in the next record automatically, then 12/16/04 and 27 in the next record after that and so on (as a default value for new records). I have tried the different built in date expressions, but I always get a type mismatch error. Can anyone help me with this? I am sure it's simpler than I think. Thanks.
I am attempting to automate the import of a .csv file from a given directory and copy and append it to another table in a different layout. Below is my code. The error that i'm getting is it can't fine the copyobject in the database...
Option Compare Database Option Explicit Function DoImportandAppend() Dim strPathFile As String Dim strFile As String Dim strPath As String
I have a form with a combo boxes and a table with relevant list and additional field, fldDefaultDrive (Yes/No Field).
Currently in order to set the default value, I have used the following code for each default;
Private Sub Form_Load() Forms!frmMediaLabeller!CboDriveName.DefaultValue = """D"""
End Sub
However, I want users to be able to go into the table and change the default value if thier CD player default Drive is anything but D: Drive. I have tried to replace the D above with an SQL statement but with no success.
Private Sub Form_Load()
Dim Drivename As String
Drivename = SELECT tblMediaDrive.fldDrivename FROM tblMediaDrive WHERE (((tblMediaDrive.fldDefaultDrive)=-1));
I am currently building a database for the company I work for that is fairly similar to the Northwind Database; however it is made from scratch so hopefully some of the common problems with that database won't find their way into mine.My problem is that when I go to my Orders form, I pick a customer from the main form, which creates a record on the Orders table. When I then go to the subform to choose a product/line item, I get the error in my title ("The LinkMasterFields property setting has produced this error: 'The object doesn't contain the Automation object 'OrdersT.") as soon as a product is chosen from the drop down list.
I'm building a make-table query for which if the result is null (no record correspond to the set of criterias), a default message like "there was no activity during the period" would appear in the table (not a message box...I need the message in the output table). The best I could think of is an IIF function but it doesn't seem to work... Is there any way to do this without using VBA?
Is there any way I can have a default value in a table set to the value in a field in another table?
I have a table that has event information including the number of the event, e.g., this year is the 51st one. This event information table only has one line because after the event I'm going to save the record to an archive table and then update the information for the next year.
I have another table with participants in the event and records for it come from a form. I'd like to have it so that it automatically inserts the event number for each record. In this way when I archive that information, we'll know which event the participant was involved in. The participant could be involved for a number of years.
I'd rather not have the input person have to type in the event number every time. Doing a combo box also involves an extra step for them. It seems like I ought to be able to automate this info. I don't know anything about VBA.
Would one of you help me? By the way, I've learned an awful lot reading on this forum. I can't tell you how many problems you've solved for me. Thank you.
I have a field named dblNumber and I want it's default value to be it's value in the previous record + 1. How can I do this ? If it's not possible in a table, can I do it on a form?
op.: I don't wan't to use the "autonumber" option...
Hello, I have been looking around trying to gather as much access info as I can. I could really use some help with what seems like it should be pretty basic to me. I am making database for excavation estimation and have a table with my equipment and a field for default costs. I then have a table where I assign costs to a specific job. So I would choose a piece of equipment from the equipment table and then would like the default values entered in from the equipment table into the job table for the default costs. So a default value is put there that can be edited for the specific job. I am guessing I need to enter something into the default data area on either the table or on a field on a form? Can anyone give me the format for putting this in. The primary key in the equipment table (auto-number) is linked to a foreign key in the job table. Thanks in advance.
Lots of other columns but they don't come in to play.
When an Amount is entered, can Wholesale and Commission auto populate with Amount*.9 and Amount *.1 using default values in the table definition? I couldn't quite get the expression builder to understand.
If it can't, how should I get it to work? Forms are OK. As is code. Thanks PB
I am making a default value statement in a table that looks like this IIF([company name] IN(“name1”, “name2”, “name3”), Date()+14, Date()+30);
this statement says that if the companys name is any of the names in the list, then the date outputed will be todays date +14, otherwise, the date will be todays date +30.
whenever i try to use the statement, access keeps giving me the error... "you omitted an operand or operator, you entered an inalid character or comma, or you entered text without surrounding it in quotation marks"
I'm using Access 2003 to write reference books. I have a field labeled Title Page and one labeled Source Page. 9 times out of 10 the Title page is the same as the source page. So, how can I put in a default value that the source page is the same as the title page, but then I'm allowed to go in and change the source page in the rare instance when they don't match. I'm fairly new to Access, though not to database programs.
I have a data bate that sends automated emails or it should. The thing is it will not open with the Icon there for it will not run with the windows scheduler. Has anyone ever seen this error before. I get this when I click on the Icon. But I can open in design and all works fine.
""Cannot find the file ;’CDocumentts and Settingd41668 DecktopCalibrationDBAutoMailer.mdb’(or one of its components). Make sure the path and file are correct and that all required libraries are available.""
I have created a Switchboard where users can enter data via a form and run reports. I tried testing by entering data into the form and switched over to see my entry in the report it's not there...
How do I automate it so that when the users run a report it updates it will their entries?
I would like to create a program within access that is linked to a specific folder on my C: drive and waits for a file to appear within the folder. Once the file appears, i would like access to process the file and return the output back to the folder. Is there a way to do this?
example: test.txt appears in folder C:Test. Access grabs the txt file, opens it, processes the information and then writes the output back to C:Test. I will need access to continously check the folder for new files.
Is there a way to open a different data base from within another?
I would love to have a command button that closes the current database and opens a second. (My project is growing and it would make things much easier if the next several sections would be on their own - esspecially since they are unrelated to the main portion of the project).
I have a qry that i wish to export to xls - but i want it to be automated
what i have is transactions and I need to have these exported in xls on the following basis
Sterling transaction - with tax type 1 (5%) tax type 2 (2%) tax type 3(N/A) etc then . euro tax type 1 (5%) tax type 2 (2%) tax type 3(N/A) etc Dollars tax type 1 (5%) tax type 2 (2%) tax type 3(N/A) etc other currencies - South african Rand - Idian Ruples etc all seperated out by currency and by tax now my reports - done - fine the xls transfer is throwing me
I know there is a key word that shows me how to do it (So let me know this word and then i should be able to take this a step forward)
now how I intend on doing this (given my limited knowledge on coding) is to run 1 qry per currency per tax rate and export into a xls book and each qry to be on a seperate tab/sheet
so let assume that each currency will have 3 tax rates (there willb e more) so i will need 3 per currency in the example above sterling , euor and dollar giving 9 qry to make - now the qry themselves are easy no problem on this - but is this the best way to do this or is there a better way ??
In simple terms please explain what an Automation object is. The Access help is any help! When I try and enter a value it comes up with "The object doesn't contain the Automation subject "Surname"" The only surname field I have is on the header of the form and is not related to the field that prompts the message. Any ideas much appreciated
My table has pre existing data in 5 fields. I want to be able to schedule and automatically append 25 records to the fields once a week. What is the best way to approch this.
I have a small mdb database that I archive every week, usually during the archive I delete all the forms expect (logon, switchboard, and three others) and keep the tables, queries, and reports. (use the forms to only enter data, which are not needed for the archive and deleting them reduces the file size)
is it possible to have something in vb, - that will run if its Friday 5pm - will backup the data base to a location on a mapped drive, - with a given file name mmddyy_data.mdb, - and have all but the 5 forms (mentioned above) deleted
My DB has one main table where all the records are stored, and one form with multiple tabs allowing for data entry and editing. There are two distinct "Data Types" I have in the tables, so on the two distinct form tabs, I created a text box with a default value for each one (if it's a Type A record, then the box has a default value of "Type A" and the same rules for Type B).
Here's the problem. It doesn't matter if I include the default value in the Form Properties Default Value field or if I do in VBA (using this method), when a new record is entered into the table, it makes them all default Type B records.
I shouldn't normally record calculated figures into my table. I'm willing to buck proper procedure here for ease of use for referencing in reports; also, it's just one data point that will be calculated only once and not changed.Anyhow, I have an IIF statement that calculates a total price based on a table of costs. I set this as the default value and it calculated properly - but once I set my text box to have a control source, it no longer calculates my cost.
I was hoping to set it so it calculated the cost and then write that total cost to my table.should mention that my calculated control is in a subform.
I have a split database ,and I need to update the Table default value of a field.Rather than go into the table I would prefer to use a form.I found this code but it wont work,I presume becouse my data base is split
Private Sub UpdateInvoiceReportNumber_Click() If Not IsNull(Me.txtDefValue) Then CurrentDb.TableDefs("PaymentsT").Fields("SelectInv oice").DefaultValue = Me.txtDefValue MsgBox "Default Value has been changed to " & Me.txtDefValue