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.
We have created a program with Access and we have all our records in it. We created a field and we need to find a way to have all our existing records use default information to automatically populate that field.
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 have 3 table table; Invoice table, Product table and Sale_product table. Sale product table records all sale from the product table
Invoice table has these fields ID TOTAL CASH_TENDERED CHANGE
Product table has
ID CODE QUANTITY NAME PRICE
and Sale_Product table has these ID PRODUCT_CODE QUANTITY PRODUCT_NAME PRICE SUBTOTAL INVOICE
I did main form from Invoice table and sub form from Sale_product table. I want to use DLOOKUP function to load the name and price, quantity and calculate subtotal automatically from the product table based on the product code entered. i have being trying hard and i keep on getting "Name? error"
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?
i am trying to create a form with a sub-form in it. i have got my client details in it - address, phone, etc then within that table i would like to keep a track of treatments for each time they visit in decending order. can anyone help me out with this? hope someone understands what i mean
Ive got a bit of a problem with my database at the moment. Here are the two tables im specificly having problems with:
Item Stock
Item size Serial Number Delivery Date Date out Stock level
Item Fitted
Item Size Date fitted Reg number Date Removed Serial Number Position
Here I have Item stock as my base table. Item Size and Serial Number info is collected from the base table and put into a combo box.
What im trying to do is when a specific item has been fitted, for access to note the size, serial number and date fitted, and place it into the correct record in the base table. serial number and size to be put in its respective table, and date fitted to be put in the "date out" field.
This is rather annoying i know and a bit difficult to explain, if anyone could help over msn that would be great - david_4321@hotmail.com
I have been looking all over for the answer to this and can't find the slightest thing about it.
I need to know how I can query information about what tables are in a MS Access database. Lets say for example I can't access the database with the MS Access application and I want to write a web query in asp to list the tables in the database. For example, I may not know what tables are in there and need to find out.
I know there is a way with mySQL using the "show tables" command but it doen't appear to work with Access
I also came accross some code with OpenSchema(adSchemaTables) that is suppose to do the trick, but it either doesn't work or my shared-hosting provider doen't have it set up to work.
If anyone could PLEASE help me out with the T-SQL query code to get table info I would be greatly thankful!
I have a form with a combo box that has a list of all the names that are contained in a table.
I am trying allow the user to select a name but then when the user selects that name it pops up the email in another text box. The name that is being selected is in the same record that the email is in.
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:
I am creating a program that will allow the user to select a sale and pull up only those product items associated to that sale in the details. Any help would be appreciated. Then with in the details section the user will/should be able to enter in the Quantity needed to order. Any suggestions on how to do this. My tblSale does provide the data needed so how do I get the data to go to the form?
I am new to this forum so if I have not asked properly I apologise now.
The Database is attached. Form Orders is the form that I am using to accomplish my task. The getproducts4Sale Query is the information needed.
I wasn't sure which area to post this question in...since it involves queries, tables, and forms :)
There is a read-only table in my company's data warehouse that stores a lot of records. I wish to set up a form that will allow users to add or relate data (fields) to each of those records.
Updating the data warehouse table structure is not an option.
How can I best do this...
1. set up my own table somewhere, that will automatically append any new data warehouse records every night, so basically I'll always have a copy of the DW table, but with additional fields that can be updated?
2. set up another table/query that are linked to the DW table via unique identifier...but if I do this, how do I display the DW records alongside the new fields in a way that makes sense? another query? will I be able to write in data in this fashion?
I am creating a database for a hyperthetical car hire company. I have a table for the customer details, a table for car details, a mid table with current car hire information. I want to create a table for previous car hire information. Is there a way that i can transfer the details from the current car hire table to the previous car hire table without copying and pasting? (when the customer returns their car)
Hi there, this is probably a very simple problem for people with experience of Access, however i have been having problems with being able to tranfer information from a query to a table.
I have made a query which displays a number of different items with their prices and who bought them (ie. booking ID)
I have then made a query which asks for the booking ID, then once you have input that it searches the items and adds up the price for all the items which that booking ID has.
both these queries work fine. The problem i am having is that i want to transfer this total price into a table. I have been able to do this by manually typing into the sql code the price, however when i try to get the query to collect the price itselfs, it gives the error "operation must use an updateable query"
btw i am making the query as a update query,
sorry if this post is a tad long and messy, thx in advance for any help
I am brand new to building a database.What I want is a database to store Quote, Job and Invoicing information. We receive quotes first and then they can, but don't always, turn into jobs. We can also receive a job without quoting it. We currently have two spreadsheets. One is for Quotes and the other is for Jobs.
QUOTES INFORMATION Quote # Date Customer Name Part # Part Name Quote Due Date Qty Lead Time Price Unit
JOBS INFORMATION Job # Qty Quote # Customer Name PO# Part # Part Name Est Hours Start Date Due Date Price
As you can see a lot of the information in the Quote spreadsheet is also used in the Job spreadsheet. (Bold represents duplicated items) We currently type the information into each spreadsheet.
Then there are different forms that are filled out for quotes and jobs that contain the information in the spreadsheets.Is there a way that I can have the QUOTE Table automatically populate the JOB Table information?
I am trying to get some totals on a report, but the totals are from a table that the form is not related to as such.I am trying to get a textbox to show how many records in a query match the given criteria and show me the number of records that match. I was thinking DCount, but not sure if it will work?
I have a query called 'VehiclesAllocatedToday' which is already filtering records to show only those allocated today. On a report that shows Unfit Vehicle (and is related to a different query), I would like a text box that shows me how many records there are where the text "Type One" is in the TypeRequired field.
Im working in MS Access 2003.Im creating an audit trail for users actions in a form, to monitor and keep track of what fields were updated/entered/removed from the database, these actions are essentially done from command buttons (and the audit trail, is coded on the button click)
However, I have a few search screens, that return a subform listing results. These datasheets returned are effectivly like opening the raw table and hence are editable, (permission to change is granted as they are admin only searches, yes, they can change the raw table)
How can I track the change to a raw table field, ie, if someone updates the field SURNAME from 'Smth' to 'Smith', is there something that triggers this (obviously if it was in an interface textbox, you could audit this) is their a field change. The only way i can suggest it make a recordset of the intial results, then compare that to the results in the table as they leve and compare the two.
I was wondering if anyone could tell me the correct syntax, or even if its possible to do the following, please remember that this code wil be written within the VB code... not in a query...
sqlstring = " " sqlstring = sqlstring & " INSERT INTO markup SELECT TOP 1 Customername AS [Cust_Name]," sqlstring = sqlstring & " customers.address AS [Cust_Address]," sqlstring = sqlstring & " customers.postcode AS [Cust_Postcode]," sqlstring = sqlstring & " customers.active AS [Active_Customer]," sqlstring = sqlstring & " iif(Active_Customer =1, 'activecustomer','inactivecustomer) AS [Cust_Current]," sqlstring = sqlstring & " FROM customers" sqlstring = sqlstring & " WHERE customer.address = " & "'" & Inputaddress & "'" sqlstring = sqlstring & " AND Cust_Current.address = " & "'" & Inputaddress & "'" sqlstring = sqlstring & ";"
Therefore, using the value of what "Cust_Current" is as the table name in the where clause. So the where clause for the above statement would either be processed as ;
I have an order entry screen which populates a table(TBLOrders). I also have a inventory Table(TblInventory). What I need to do is be able to enter the inventory item id on the form and then populate 4 fields in the TblOrders table with information which is stored in the TblInventory.
I have tried Auto Lookup it brings the information on the form but it doesn't save it to the table. Is the form source suppose to be the Auto Lookup Query or the TBLOrders? I am missing something but not sure what. Any suggestions would be appreciated.
I'm making a customer survey database. Also be aware I'm not proficient with access.
All the customer information is being imported from an excel spreadsheet. That will include ServiceRecordID, ServiceDate, TechID, CustName, ServLocation, PhoneNum, and DeptID.
Another table will include records for answers to 5 questions that will be asked by a manager on the phone. That table is called TblQuestions. This table will also have ServiceRecordID to go with the answers.
What I'm trying to do is create a Form that at the top has a box for ServiceRecordID. I'd like to be able to type in the Number for that ID, and then all the information shows up on the form for that specific ID. And below all that, fields to add the answers to TblQuestions for that specific ServiceRecordID.
The reason I'm doing this is because the manager will get a report with the customer information that needs a follow up call. So I want them to be able to call up that information on the screen with the ServiceRecordID number, and also be able to add in the information that they get back from the customer with the questions that will be asked.
I don't know why I'm having so much trouble with this. But I'm not experienced with access or VBA both.
I have a simple database, consisting of two tables and one form. I'd like the form to display information mainly from the first table (table 1). For this, I have used the Form Wizard, which works well and displays as it should. My problem comes when trying to display data from table 2, without using the Form Wizard.
I have a simple field called 'Number' in 'Table 2'. I'd like this value displayed in a text box along with table 1's data. I've tried using the expression builder, which gives me something along the lines of:
[tbl_Table 2]![Number]
But this is displayed as:
#NAME
...when I open the form. Could anyone explain how I do this correctly please? All I'm trying to do is display data from other tables in the form.
I've got this simple thing.. which I couldn't do and stuck for a long long time.. I have done some programming in a few languages, but not in SQL or VBA and I quite confused about programming styles that VBA and SQL accepts.
I'm currently working in Microsoft access and the thing I'm stuck on is retriving field value from a record and writing into another record on the same table.
For example the table "Table-users" looks like the following:
ID Name Year Month Date 1 Steven 1979 9 18 2 Jeremy 1977 10 22 3 Eslynn 1988 10 10
I've built a form that contains two lables (combobox), "ReplaceMe" "LoadMe" and a command button. Which end user could choose which record to load and which to replace.
I wish to copy Year, Month and Date from LoadMe into ReplaceMe without effecting the Replace me ID and Name.
The VBA, SQL code i've got looks like. ----------------- 'Command_Click is the tigger button to active the following code. Private Sub Command37_Click()
'Below is an example of what I wanted to do field by field. However, in the real 'environment, I needed to move about 20 odd field into another object. I'm not sure 'to use Append or Update Query Dim UpdateSQL As String Dim text1 As String Dim text2 As String Dim text3 As String
'this loads the string containt-the Name of the object-into text1. 'this line works fine, arr.. other ones don't....... text1 = Me!ReplaceMe text2 = Me!LoadMe 'Load the month of the LoadMe. text3 = Table![Table-users = text2].month
'Loads the SQL instruction into UpdateSQL 'Table-table is a table, containing several objects and fields. UpdateSQL = "INSERT INTO [Table-users].text1( [Day], [year], [month] ) " & _ "SELECT Table-users.Day, Table-users.year, Table-users.month" & _ "FROM Table-users" & _ "WHERE (((Table-users.Name)='ReplaceMe'));"
DoCmd.RunSQL UpdateSQL
End Sub-------------------- Well the obvious, the above code doesn't run. If LoadMe = Jeremy, ReplaceMe = Steven, the above code should return:
ID Name Year Month Date 1 Steven 1977 10 22 2 Jeremy 1977 10 22
Making Steve's Year, Month and Date field the same as jeremy
======================
What I think i'm confused about is when do I use [ ] ( ) ! .
Like... if I wanted to read the field value of "Date" from the object from the "Name" in combo box "LoadMe", what should I write?
ie, if the combo box "LoadMe" contains Eslynn. The end result should be 22.
I have created a form and a subform within it, I have managed to populate all the dropdown boxes from the tables I need. but I need to save all the information in putted to a table called bookingstbl and I do not know where to begin?
I essentially created an account since I can't seem to find a straightforward answer much anywhere else (plenty of hints on auto-filling forms- but that isn't particularly conducive to my specific need on this).
I've attached a blank copy of my database.
The immediate concern I'm having is that I want to be able to autofill data in the invoice table based on the customer table and the products/service table.
*I want to be able to select a first name [or other primary key if necessary] to fill in the last name, company, address, city/state/zip, phone, fax, cell/alt phone, and email automatically... that is without multiple dropdown selections or input to those sections at all.
*I want prices to fill in to the 'cost of product/service X' so that I may use it for other calculations in the invoice table- as well as to make forms from it directly.