I have Two tables one table has a Master list of products (ProductMaster) with a Unique product code (ProductMaster.UQ_ID).
The second Table has Order data. The Second table (OrderTable) is where I will enter the product code (UQ_ID) which is the unique Identifier which is also in the ProductMaster. As soon as I enter the Prodt code in the OrderTable I should have all the related fields filled in from the Product Master.
Columns in The ProductMaster = Product_ID, Product_Manucaturer, Product_Weight, Product_Color, Product_Size
Columns in The OrderTable = Product_ID, Product_Manucaturer, Product_Weight, Product_Color, Product_Size, Order_Date, Ordered_By
The columns marked in red are the ones that will have to be automatically fetched from ProductMaster
The data in the second table should be populated from the ProductMaster as soon as I enter the Product_Code. The rest of the details Can be filled manually filled in.
Is it possible to do this with Access. I have tried different expressions in the Fields without much use. The Documentation from Microsoft is very weak. If someone knows a solution or where the documentation is, please help.
I am trying to improve the performance (loading time) of my main form. The big tip seems to be use SQL in VBA to populate subforms and comboboxes when needed, rather than when the main form loads.
I have a combobox configured for 2 columns, bound column = 1 and column widths set at 2cm each. After a struggle, I have managed to get the combo box to populate with SQL, but only for the first column. My second column appears when I click the down arrow but there is no data showing.
How do I tell the SQL to place the 'Identifier' data in the second column of my combobox? :confused:
Here is the subroutine populates the combobox when the subform loads: Private Sub Form_Load() On Error GoTo ErrHandler '================================================= ======================== 'Populate cboEmployeeID with SQL when form loads 'This is done to reduce time taken to load parent form '================================================= ========================
'Define the SQL text Dim stSql As String stSql = "Employee_ID, Identifier, Section_ID, Office_Phone_Ranking, Role FROM [tbl_Prj_Details]" stSql = stSql & "WHERE (((tbl_Emp_Details.Section_ID)=2) AND ((tbl_Emp_Details.Role)='Technical'))" stSql = stSql & " ORDER BY tbl_Emp_Details.Office_Phone_Ranking;"
'Populate combo box with SQL With Me![cboEmployeeID] .RowSource = stSql .Requery End With
ExitHere: Exit Sub
ErrHandler: MsgBox Err.Number & " - " & Err.Description & Chr(13) _ & Chr(13) & "Error in 'fsubPrjDet01EDT1': Err 003" Resume ExitHere End Sub
I have two tables, "Membership" and "Class." The Class table has a class ID, class name, and cost of the class.
In the Membership table, I have a field to accept a class ID that is entered by a user. I also have a column called Tuition. When the user enters a classID in the Membership table, I would like the dollar amount associated with that classID to automatically appear in the field called Tuition in the Membership table.
I tried the LOOKUP data type and calculated fields, but no luck. I know that DLOOKUP can be used on forms, but I don't see how it can be used directly with tables.
Doing Ctrl + ' will put in the value from the cell above it. But I want to do this across 4 columns. On one row, I am selecting across 4 columns and doing Ctrl + ' and only the first cell populates with the value above it.
Is there a way to get the 3 other columns to populate with the value of them (the values are different across all columns).
I have a simple table with two fields in that table called:
1. BankName 2. BankNumber
Each bank has a bank number. For example Bank XYZ and all of its branches have the same Bank Number 123. There are 5 banks I have listed in a combo list under the BankName field. I can also type in a different bank in that same field if it is not listed in the combobox list.
Now, I want the BankNumber to automatically populate based on what I choose under BankName. If the BankName is manually entered (for banks that are not in the combobox), or if the BankName field is blank, I want the BankNumber field to be able to enter a number manually.
For example, if I go to the BankName field and under the combobox I select Bank XYZ, i want the BankNumber field to automatically populate as 123. If the BankName has a bank name that was manually entered, i want BankNumber field to allow me to manually enter a number.
Thanks for ur help. I couldn't figure this simple request out.
I'm writing to an excel file from two separate Access tables, for which I'm using two separate DAO.Recordsets in VBA.The first table has 190 columns, the second table has more than 66 columns, so more than 256 columns will be written to the excel file.So I'm not expecting any error due to any maximum of 256 columns, but still I'm getting an error while trying to populate the 257th excel-column:
Run-time error '1004': Application-defined or object-defined error.(The same VBA works fine when I use another table with less columns.)Even more strange: on another computer I did not get the error and I was able to populate more than 256 excel-columns.
Code:
Option Compare Database Option Explicit Dim xlApp As Excel.Application Dim xlWkb As Excel.Workbook Dim xlWks As Excel.Worksheet Dim FileNameOut As String Dim RowNr As Long Dim ColNr As Long
I am looking to populate fields of one form based on another table with about 100 records.
Information Table Name: 1) StaticInfo 2) Data
Form Name: EntryForm (Based on the Data table)
I want to be able to select a value in a combo box in the EntryForm and have certain fields populated in that form based on the StaticInfo table.
Want to use all of the fields in StaticInfo to populate the same fields in Data. Historical data in the Data table needs to remain intact, meaning that if something is changed in the StaticInfo table, the historical records will remain unchanged in the Data table.
So, if I am able to select a department in a combo box in the EntryForm and have the fields populated in this form based on the StaticInfo table, will the records in the Data table change or not change if there are changes made to the fields in the StaticInfo table?
Also, could someone provide a method as to how I would go about populating these fields from table to form.
I wasn't sure where I should have posted this question so please feel free to move it if necessary.
I am not even sure this is possible and I didn't know where to begin but these forums have always been extremely helpful.
What I would like to do is export data directly from Access (via form, table or query) and populate it directly to an existing, external webpage.
A little background. My company orders cars an for certain manufacturers, Toyota for example, we order via a secure website. All of the other manufacturers have their order directly transmitted to them. The orders for Toyota take 3-4 times longer to place and I was hoping to speed the process by exporting existing order information directly to the webpage.
Please let me know if it seems like I am smoking something and I will gladly step away from the pipe....=)
I have search the forum but dont seem to be able to find the solution i am looking for. I am hoping its because it has a simple solution .......
I have a database which records grant applications for the current year. What i also have is a table which stores all the grant applications from last year and i have a search form which the user can search to see if the applicant applied last year. What i want the user to be able to do is if the applicant did apply last year - to be able to double click on the particular applicant on the search form and populate the fields in the new applicant table, show on the new applicant form, and delete the applicant from last years table. This would save the user time because they would not have to retype name, address etc. Can someone please point me in the right direction? I seem to have a mental blank with this one.
I deal with freight carriers and each one is assigned a code. There are over 30,000 carriers so I don't want them all in my carriers table.
I have them all in a CarrierCodes table. I would like to open a form that would allow the user to search for the appropriate carrier and when they choose it would populate that data to my Carriers table.
I have a form based on a table named <Staff>. The fields in the form are StaffID, Surname, Name, Grade. What I am trying to achieve is that when a particular StaffID is selected, the other corresponding fields (Surname, Name, Grade) are filled up automatically. Could anyone assist? Thanks.John.
I posted a few days ago about how I am using a combo box for selecting/entering a name on a form. Once the name is chosen for 'txtEventLeader' it updates the query so the next record shows that name as an option for selection in the combobox.
What I want to do now is also have a field called 'txtEventFacilitator' which would also update the query and update the combobox (regardless if one is choosing the Event Leader or Event Facilitator). I think I need to make a one column query which puts all of the names in one column, regardless if they were the Event Leader or Event Facilitator.
I've been working on this issue for quite sometime. I've tried different methods, such as the DLookup function, but I think I'm doing something wrong. Let me explain what I'm trying to do:
This is a Work Order, the user will Select a Customer (Table Customer: Contains CustomerID and Customer Name, address, etc) from a drop down box. When they do this, I have another textbox which is designated for the Address. I would like the address to automatically populate. but its not quite working. I've tried it with the DLookup function (I entered it into the control source of the textbox). I entered the following syntax:
It keeps coming up with an error. I have no idea why.
Now this is just the first half. The second half I have a subform on the same main form, which lists the equipment they have on their site. The database has a number of customers with many equipment for each of them. How do I make sure that the subform only populates equipment associated with the Customer that was selected on the main form?
I have a database that keeps track of inspection records. What I want to be able to do is open the form Inspection, and select a part # in a dropdown. When I do that I want it to fill in all of the critical item/dimension boxes on that same form for that part number that I selected above. I tried to figure it out from the sample database example on here, but I just cannot figure it out. Any help is greatly appreciated. A copie of my database is attached.
Been having trouble setting up a combo box in a form that displays data from the same line in the table into a text box.
I am trying this with a memo field without any luck. I am using a 2 column query for the combo box, the first column contains the name and the second contains the requirements (memo).
I have put in the after update code:
Private Sub CustName_AfterUpdate()
Me!CustReq = Me![CustName].Column(2)
End Sub
Can anyone please shed light on what I'm doing wrong?
Now, I have created a main form based on student table and a subform based on studentCourse table. However, because I needed to populate the courseName and CourseDescription in the subform I changed its record source to a query (stID, courseID, courseName, courseDescription) so that when I move between the subform records the courseName and courseDescription still show in the subform.
To populate the courseName and courseDescription in the subform I changed the courseID to a combobox so that it brings the courseName and courseDescription from the course table and show it in the subform.
Everything is working fine so far BUT when I choose to input a courseID manually into the combobox, it does not populate the courseName and courseDescription as it does when I choose the courseID from the combobox.
In my database table I have a MainMember_Tbl which contains address fields. I also have a related table (via a field called Member_ID) called JointMember_Tbl which also contains address fields. For any particular member, mostly there is no joint member, but when there is a joint member the address fields are often the same as for the main member, but not always.
In the case when they are the same, I would like to use a button within the data input form for the joint member to 'duplicate' the address fields saved in the MainMember_Tbl - For example ....
So, the Person table has 2 IDs (neither is the primary key of the table, like SSN and HRID). What the customer wants is to show both IDs in the Orders table.I'm having trouble getting the table to populate the second ID field based on what is selected from the drop-down in the first ID field.
Person table (ID, FirstName, LastName, SSN, HRID)
Orders table (ID, PersonSSN, PersonHRID, etc.)
If I populate the Look-up field of PersonSSN as 'Select SSN, HRID from Person' (use column 1 as value), how do I get the HRID field to populate when someone selects a SSN value from the Person drop-down?And the follow-up, can I get the same thing to happen in reverse (i.e. populating the PersonSSN value when the customer selects an HRID from the PersonHRID drop-down)?
I am trying to populate fields from one table into another field in a linked table. Specifically, I have a giving table and a persons table. I have the giving table have the persons primary ID field in the giving table. I cannot seem to automatically link them if I am adding a "gift" record. The gift is a dollar amount given by that person. I have a unique primary key for each financial contribution which is supposed to be tied to a person's primary key and last name in my "person" table. Am I missing something in this design?
Sorry for posting into another thread about this, but here's my problem:
Hello All. Finally getting my pride out of the way and asking this. I've searched and this is the closest question pertaining to the problem I'm having. I have created a form to populate a table in Access. I've created Lookup fields for parts of the table that will get data from another table/tables. I want a certain part of the form to auto-populate data based off of the last name I put in the initial Drop-down box. Say, I have a person with a last name (and there are several with the same last names), I want the remainder of that line in the form/report to populate with his/her data needed for the form letter. Unfortunately right now, I have it where we have to select each from a drop down menu, for both last names, first names and other data needed. I've tore my brain up trying to figure out how to link the data in each one of the combo boxes to the first combo box. Any help would be appreciated. These are driving me nuts as I should be able to figure this out and it's just escaping my vision I guess. Thanks in advance for the help.
I have created a database which has 9 tables, the first table being the contact information, but in all tables there are fields for firstname, lastname. Is there a way when you enter the firstname/lastname fields into the main table that it can populate the same information in to the same fields in the other tables? If so how?
I have an insert query that has been working just fine. I added three new columns (Paid, Balance, Invoiced) to both tables that I am using in my query. The query will insert the new records that don't exist in the one table just fine but it is not populating the new columns.
I am trying to create the form so when the first field (Start Date) has a date selected, it limits the following field (Report Date) to the matching available data, and same with the third field (Production Division) on the previous two.
I also need the form to allow new dates / production division combinations, but not duplicate.
I starting working with a cascade function but got confused and not sure if that is where I should be headed.
I have attached 2 different formats of the same sample data.
Last week some very altruistic folks here helped me solve a many-to-many relationships quandry, and I am hoping that there may some others out there who can help with another question.
I have a feeling this is simple, but I can't quite get my head around it, and have not been able to find it in the past forum threads, but....
I want to create a tblJobs that has information about our clients' Companies, as well as Contact. As there can be many Contacts for each Company, my current setup looks like this:
tblContacts ContactID (Pkey) Name Lookup_to_qryCompanies_to_Contact(shows Contact's company)
tblComanies CompanyID (Pkey) Company Name (Client info is included as embedded table based on qryCompanies_to_Contact)
qryCompanies_to_Contact Company (from tblCompanies) Contact (from tblContacts) (one-to-many)
In my new tblJobs, I would like to have a combo box in which I can input the company name, and then the next field will have another combo containing ONLY names of the contacts affiliated with the chosen company. (I will also eventually like to make a form that allows the same function, but am assuming that the process will be the same for updating the table trhough a form as it would be updating it directly).
I have two questions. I have a form with 2 combo boxes. The first pulls from a simple list. Once you make a choice, the second combo box is then filtered by the first. This works correct, except that once a choice is made in the first, the filter is locked. If you change the first combo box's value a second time it does not effect the second box. The query that I am using for the second combo box has two columns that pull the first 50 characters of a pair of memo fields. Quote: SELECT MSSS.SS_ID, Left([Application_Name],50) AS Expr1, Left([Description],50) AS Expr2, MSSS.Site_Code FROM MSSS WHERE (((MSSS.Site_Code)=[Forms]![Edit or Delete Requests]![Combo6])); These fields are then used to populate 2 text fields using an event procedure. Quote: Private Sub Combo10_AfterUpdate() ' Display Partial Application Name and Description based on choice Me!txtApplication_Name = Me!Combo10.Column(1) Me!txtDescription = Me!Combo10.Column(2) End Sub This is working fine, but it starts the next problem.
I need to change the form to include the entire memo field into a text box. I was using the columns of the second combo box to fill them in. Since the combo box is limited to only 50 characters, i could only grab part of it. I am guessing there is a much better way to accomplish what I need, but I am too inexperienced with forms and vb to come up with it. Below are the fields I need from table MSSS Business_Name Application_Name Description Acronym Level_1_Support Level_2_Support Escalation_process Troubleshooting Priority Links Modified Disabled