DLookup Function To Load Information From Table To Another Table Using Subform

Mar 22, 2013

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"

View Replies


ADVERTISEMENT

Forms :: How To Save Result Of DLookup Function (used In Unbound Text Box) In A Table

Oct 17, 2014

I have a form based on query. On form i am retrieving data from another table using DLookup in a unbound text box. So I want to save the result of DLookup function in another field/table on same form.

View 8 Replies View Related

Forms :: DLookup To Return Form Load

Dec 12, 2014

I am trying to create a multi-user web-based database where all users log-in and see different forms based on a field in the user table.

I am trying to use a DLookup to return the name of the Form I want open based on the command box that shows the userID and UserName

DoCmd.OpenForm , acNormal, DLookup("field", "table", "[UserID]=" & Me.cboName.Value)
cboName row source
SELECT [table].[UserID], [table].[UserName] FROM table ORDER BY [UserID]

View 5 Replies View Related

Reports :: DLookup With Auto Date - On Load Sequence

Dec 17, 2014

Ok, so I have this table (tblPayPeriod) with the fields Start Date, Stop Date, Pay Period & Percent FY. The Percent FY field is a Number field that gives off the percent of the fiscal year (FY) that we are in.

Then I have a report (rptDistrictMgr) that in the header I want it to display what percent of the fiscal year we are in based on the Auto_Date that is in the header.

So, if the Auto_Date is December 17, 2014, we are (according to tblPayPeriod) 24.1% into the fiscal year and I want the 24.1% to display in the text box which called Text99.

I would just like a simple dlookup that I can use as the control source of the text box or an expression to put into the On Load sequence.

View 6 Replies View Related

Load A Table From Servlet

Sep 19, 2005

Hello,
I have a client who downloads data from a website. I must then put this data into an access database. The problem I am having is that the file is a strange format - it comes to me as filename.servlet[3]

I am assuming that this is some kind of java file, but am not really sure. I can open it with notepad and it looks like a comma delimited file, but i can't figure out how to get it into an access table.

Does anyone have any idea how to handle this file?

Any thoughts would be appreciated.

Thanks.

View 1 Replies View Related

Using The Information Inputted In A Table As A Table Name

Apr 16, 2008

Hi,

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 ;

sqlstring = sqlstring & " AND activecustomer.address = " & "'" & Inputaddress & "'"
or
sqlstring = sqlstring & " AND inactivecustomer.address = " & "'" & Inputaddress & "'"

Depending on what the value of Active_Customer is.

Can anyone help?

View 14 Replies View Related

Popluating Table With Information From Another Table

Nov 11, 2005

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.

View 1 Replies View Related

Queries :: Dlookup Value From 1 Table With Date Ranges From Diff Table With A Single Date?

Mar 12, 2015

i have 2 tables.. 1 with bookings and 1 with a BonusPeriod range.

in the Bookings table there is a field called [ServiceDate]

in the bonus table i have a field called [Period] which is text i also have 2 dates, [StartDate] And [EndDate] i need to Dlookup the Bonus table to return the value of the period table based on where the [ServiceDate] falls.

i dont want to use VBA (i really need it to work within a query that inserts it's data into another table)

i've tried everything but had no joy

Expr1: DLookUp("[Period]","BonusPeriods","[ServiceDate]" Between "#[StartDate]#" And "#[EndDate]#")

Expr1: DLookUp("[Period]","BonusPeriods","[Staff_BookingsAndQuotes_Master].[ServiceDate]" Between "#[StartDate]#" And "#[EndDate]#")

Expr1: DLookUp("[Period]","BonusPeriods","(FormatDateTime([ServiceDate]),"yyyy-mm-dd") Between (FormatDateTime([BonusPeriods]![StartDate]),"yyyy-mm-dd") and (FormatDateTime([BonusPeriods]![EndDate],"yyyy-mm-dd"))))

View 10 Replies View Related

Tables :: Copy Parts Of One Table To Another On Form Load

Dec 13, 2013

Access 2013. I have a table that I would like to contain columns from other tables when the form containing the table is loaded.

Example:

I open a form to input information into the table 'Equipment Input', but I want Equipment Input to be partially loaded with columns from another table 'Equipment and Rates.'

View 7 Replies View Related

Forms :: Load Before Execute Make Table Query?

Mar 21, 2014

I have a form which I want to load before it starts up a vba function. How can I do that? Right now I use form_load(), but the problem is that, it loads the msgbox before loading form.

Code:
rivate Sub Form_Load()
Dim sFolderSpec As String, sCSVSource As String, dFileDate As Date
sCSVSource = "MDM_Syndicator.csv"

[Code]....

View 1 Replies View Related

Modules & VBA :: Load Specific Email Items To Access Table

Jul 8, 2014

In my Access app, I need to be able to retrieve a specific email by date/time, then take the Subject, the Date received and body of that email and save it to a column in a table.how to do this in Access VBA?

View 1 Replies View Related

Forms :: TextBoxes Getting Information From Queries (DLookup)

Aug 4, 2014

Retrieval of data from a query and putting it into a textbox on a form. I currently have a form where I would like to put in a Job Number, and then hit an "Update" button and it will show some of the data fields associated with that Job Number. I have a table called "All Jobs" and each Job Number is unique. Where I'm really having issues with is in regards to Dates and Boolean fields.

In one form, I put in a job number and it will bring up the Company, Motor type, Received Date, and Quote. I have been able to retrieve the Company, Motor, and Quote with a DLookUp expression using a query. The expression looks like:

CompanyName.Value = DLookUp("Company","Approved Job Form - Find Job Info").

CompanyName would be the name of the textbox on the form, with "Company" the field within the "Approved Job Form - Find Job Info" query. The query itself uses the job number entered onto the form and returns the other data fields associated with that job number. Running the query by itself returns the correct information. My issue comes with using the Date Received field. It seems that because that field type is a Short Date, my DLookUp expression keeps prompting the debugger in the code. Currently I have:

RcvDate.Value = DLookUp("Receive Date","Approved Job Form - Find Job Info")

This will not bring the date from the query into my text box like the others.

In another form, I'm also having issues with a Boolean data field. I would like to have a query that looks up a job number, and if my data field (Job On Hold) is checked (True), I would like it to return a value of "Job On Hold / In Progress" into a text box. If it is unchecked (False), I would like it to return "Job Approved". I've tried a bunch of different ways to make it work, but I'm really stumped. The makeshift code I last tried (I've tried this numerous ways, so I'm not sure if I was closer before) is:

Dim jobstatus As Boolean
jobstatus = DLookup("Job on Hold", "Job Status Form - Search Status")
If jobstatus = False Then
Status.Value = "Job Approved"
Else
Status.Value = "Job On Hold / In Progress"
End If

View 6 Replies View Related

Modules & VBA :: Load User Defined Function At Startup?

Jul 15, 2013

I have quite a few user defined / custom functions which I would like to be available in any new database that I create without have to copy the VBA codes in a module each time. Basically, some sort of add-in that loads on MS Access startup may be (but I am not too sure - never created one). So something that will start with the MS Access Application and not just a particular database. I know excel addins can be copied to the XLStartup folder to achieve something like this in excel, but not sure about Access.

View 11 Replies View Related

Information Within A Table

Apr 14, 2005

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

View 3 Replies View Related

Looking Up Specific Information From One Table To Another

Aug 3, 2005

Hey everyone,

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

Thanks

David

View 1 Replies View Related

Query Table Information With T-SQL

Sep 12, 2005

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!

Thanks in advance,
Dan
dan@innovativead.com

View 1 Replies View Related

Need Default Information From Another Table

Feb 7, 2007

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.

View 1 Replies View Related

Problem With Getting Information From A Table

Feb 14, 2007

Im using Access 2003.


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.

whats the easiest way to do this? vba?

View 1 Replies View Related

Sub Cell Information In A Table

Aug 9, 2005

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:

View 6 Replies View Related

Syntax For Dlookup In Table

Jul 1, 2007

Hi all, instead of doing a dlookup via a query, i'd like to do a dlookup for price direct in a table where the criteria is the value in Text1 from Form1

outt = Nz(DLookup("[Price]", "Table1")) Where Product = ' Text1' from Form1

Whats the correct syntax for this please? Thanks

View 2 Replies View Related

Continuous Subform That Retrieves Data From One Table And Saves To A Different Table

Mar 8, 2012

I have a Traits table that has fields TraitKey and Trait and I'm looking for the subform to show one record for each trait so that I can give the employee a score for each trait.

I'm trying to save that score in an EmployeeTraitScores table that has the fields EmpID, Trait, Score.

If I bind the subform to the traits field, the continuous form shows each one properly but then I don't know how to save to the scores to the EmployeeTraitScores table.

If I bind the subform to the EmployeeTraitScores table then it can save a record but I can only get the Dlookup to show the first trait.

View 3 Replies View Related

How To Call Information From One Table In Two Spots

Jun 19, 2006

Please help!!

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.

View 1 Replies View Related

Adding Information To A Read-only Table?

Jan 31, 2008

Hello,

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?

3. ...some other way?

Any assistance will be very much appreciated!

View 2 Replies View Related

Table Structure - Transfering Information

Sep 25, 2006

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)

View 1 Replies View Related

Transfering Information From Query To Table

Mar 15, 2006

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

View 1 Replies View Related

Forms :: Look Up Information In Backend Table?

Aug 2, 2013

Is there a way to set up a keyword search within a form and use it to look up information in a backend table?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved