Ok I'll premiss this by saying it has been many years since I have done much with access so I have forgotten alot and alot of things have changed. However I have been using Dataease alot but switched companies so am back to access.
In dataease if I had a form called projects and that form had three fields (employee ID, employee first name, employee last initial) that pulled data from another table other than the projects table I would relate them via the employee ID.
projects form employee ID = employee form employee ID
then for the two other fields I would have them lookup their data by using the employee id.
projects form employee first name = if (projects employee ID = employee employee ID) then lookup employee employee first name.
And the same for the last initial.
The question is how do I setup for fields for first name and last initial to do the lookup in access.
Employee ID Table
Employee ID #
Employee First Name
Employee Last Initial
Project Table
Employee ID (linked to employee id table)
project id
project name
project discription
project start date
project end date
project form
project id
project name
project discription
project start date
project end date
employee ID (must match employee table employee id)
employee first name (read only field that looks its data up from the employee table based on employee id)
employee last initial (read only field that looks its data up from the employee table based on employee id)
When I set up lookup fields that point to a table do I save those tables in the back end with the main tables or is it okay to have in in the front end and not the back end? Users will need to make udpates to the tables for instance an employee table they would need to add employee names.
how to do a particular thing in Access 2010 (I don't even know if it is possible).
I have a table named PRODUCTS: ID_PRODUCT (primary key, autonumber long integer) ALLOWED_OPTIONS (multi value text lookup field: "Option 1";"Option 2";...;"Option 9")
So I can store, for each different product, none, one, or more options to let the customers choose from.
I have a table named ORDERS: ID_ORDER (primary key, autonumber long integer) FK_CUSTOMER (foreign key, linked to the primary key of a CUSTOMERS table; represents the customer that places the order.) FK_PRODUCT (foreign key, linked to PRODUCTS.ID_PRODUCT; represents the product that the customer has choosen) CHOOSEN_OPTION (lookup text field; the customer must choose ONE option among those allowed for the product he has ordered)
The problem is that I would like the CHOOSEN_OPTION field to show as a combobox, listing the values stored into PRODUCTS.ALLOWED_OPTIONS, so that when a customer buys a product, he can choose only among the options allowed by that particular product.How can I manage a multi value field to populate a combobox, in which every item stays on its line? If I use, as a query to populate the combobox:
select [PRODUCTS].[ALLOWED_OPTIONS] from PRODUCTS where [PRODUCTS].[ID_PRODUCT]=[FK_PRODUCT]
I obtain an empty combobox.If I refer to the last field as [ORDERS].[FK_PRODUCT], Access asks me to type a value for "[ORDERS].[FK_PRODUCT]", treating it as an unknown parameter.I think that the problem is that when the combobox expands, the record is not committed yet, so FK_PRODUCT is unknown (NULL?). But this happens even if I commit the record typing something in FK_PRODUCT and then I re-enter the record and I expand the CHOOSEN_OPTION combobox, that is still empy although FK_PRODUCT exists, now.Is there a particular syntax to refer to a field in a record not committed yet (something like "THIS." or "ME.")?
I have a numeric field (long integer) in a table. I've set the format to fixed. No matter what I set the decimal places to, auto, 0 or 2, when I enter a value of 0.71, it displays as 1.00
In my form, I've also set the field property to fixed, but it displays the value as 1.
I want to create a different rowsource-query for a lookup field (field1) in each record in a subform. The rowsource changes dependent on the value in another field (field2) in the same record. How can this be done?
- I tried to change the rowsource-query in an eventmacro when the focus is set to field1, but this ofcourse changes the rowsource for all field1's and makes the allready selected values unvisible. - I think I have to include the value of record 'field2' in the rowsource query, but i cannot find a way to include that value in the query.
Something like:
Lookup field1 in the subform contains this rowsource - SELECT CUSTOMER.Id, CUSTOMER.AGE, CUSTOMER.NAME FROM CUSTOMERS WHERE (CUSTOMER.AGE= me![field2]); me![field2] however does not function
I have tblDefaults that has only one record, containing default values. Next I have tblWebpages that has a Memo field that holds my html data. Lastly I have a Form called frmCreate with a field called Webpage. This Form is based on a tblCreate table.
Whenever I click a command button on my Form, I want to populate the Webpage field on my frmCreate Form with a template from tblWebpages. The template to chose will be based upon the WhichTemplate field in tblDefaults.
In brief, tblDefaults tells me which is the current webpage template and so the field should be populated with that html data.
I am creating a table with a field named Payment ID. I want the table to increment the number of this field automatically when the user is trying to enter a new record, i.e. set the field as an autonumber.
I know that this is very basic, my MS Access skills is really limited.
Im not sure if this is the right area to post this but what i wanted to know is how i would set the field "status" to OutStanding when a record is added into the table.
PeopleType: ID and description (e.g. 1 student, 2 teacher, etc) PeopleDetails: PeopleType.id, name, gender etc
I have a form that contains subforms
On the Main section of the form the data comes from the PeopleDetails. I want the user to fill in this but I want the PeopleType.id to be set to e.g. 2 so that you can only key in teacher details.
I have been trying to set it using a macro SetValue but i cannot get it to work.
I have a form to enter attendance in that pulls students from a StudentEnrollmentTable based on FacultyName which is selected from a combobox that runs the following code:
Private Sub cboInstructorName_Click() Me.Requery End Sub
A query (StudentAttendanceBYFaculty) is run each time a faculty name is selected. On the form their is a field name TempClassesAttended which is bound to a field of the same name in the StudentEnrollmentTable. Teachers will enter attendance data and run an append query to append the current form records to the StudentAttendanceTable. Each time the form is repopulated the most recent TempClassesAttended values are pulled into the form. This is what is expected.
Now I want to load Null values into the TempAttendance field on the form each time the Faculty selects their name and runs the event. I looked at code online and it seems easy enough, but I don't know enough to make it work. This is the code suggested:
UPDATE TableName SET FieldName = Null OR UPDATE MyTable SET MyField = Null
how to include this into the current event so that the event will return the faculty records with Null values in the TempAttendence field.
I have a membership database. A number of members go by their middle names or a nickname rather than their first name. I need to keep track of their real full names, but I want the new-record default of the preferred name field to equal the contents of the first name field. How do I set this in the table design? The table already has 1400 records, and it would be quite a job to manually copy each first name to the preferred name field, a job I would rather avoid.
I have only been playing with MS Access for a little while and I do not know all there is to know yet so I figured I come here to ask a question.
I use MS Access in web design and lately I have been experiencing a problem with my registration form which inserts new users into an MS Access database table.
Lately my registration form has become a target for spammers trying to inject spam in the form of html code into the password field of the online registration form.
I figured that I could deter this from happening by only allowing the letters A - Z and numbers 0 - 9 in the field and not allowing characters like < > and ? and ".
I assume I can do this with a validation rule but I'm unsure as to how I would go about setting this up. Limiting the field size to only 50 characters does not seem to work unfortunately.
Any help on how to set up a validation rule would be appreciated.
I have a query that I manually export as a dbf file (i.e. right-click and export). I manually export because I export to a unique directory each time. However, fields in the query that are of type string always get exported with a length of 255. Is there anyway in SQL that I can set the width a query's text field to a specific value (so that when I export it it isn't 255 characters long)?
I know its probably a simple one but I am new to access, so...
I have a simple membership database and in it I keep a record of who I am expecting to attend on a particular date. This is achieved through having a seperate field for each meeting on a simple yes/no type.
I would like to be able to print a report from a form for a particular date showing everyone that would be attending. I have a list box that shows all the fields. What I cant do is set the date I want in the query from the report, can anyone help?
I am "OK" when it comes to figuring out a formula in Excel, but Access is much different for me. I am looking to set up a calculated field in a report.
The result is find the Client-to-Staff ratio but there are two possible conditions:
how to set the Field Size in a new Table. I need the user to be able to type in 17 characters (as in a vehicle VIN). I don't want the user to have the ability to type in anything less than 17 characters or anything more than 17 characters.
my only other issue!!! i have a lookup field on a table and when i view it in datasheet, i can see the actual lookup value i need however i have tried the following options: create a form from the table added a combo box to an existing form and gone through the wizard
both options show the id number and NOT the value i need to show. what can i do to show my actual information?
ID VALUE NUM_LOOKUP -- ------ ------------- 1 ABC 1 2 DEF 3
Now, I'd like to use the lookup feature so that NUM_LOOKUP is a combo that displays the data in VALUE based on the relationship between ID in the two tables.
So, when you open the Letters table, you see the above. If you click in the NUM_LOOKUP field, you get a box that displays "123" for the first record and "789" for the second record.
I'm very close -- Here's what I have:
I tried the following: Display Control: Combo Box Row Source Type: Table/Query Row Source: SELECT [ID],[VALUE] FROM [Numbers] AS [NUM_LOOKUP]; Bound Column: 1 Column Count: 2
Problem: This selects ALL values of ID from [Numbers].
I tried adding the following to my row source: WHERE [Letters].[NUM_LOOKUP]=[Numbers].[ID]
This just gives me the "enter parameter" dialog box for [NUM_LOOKUP] and [ID].
Alright, I have a field called metrics that looks up the text in another table caled Metric Name. I want to delete the table that is being used to supply the values, but I still want a listbox with all those names. Also I want to be able to add names to that listbox. I am not sure how to do this.
It is along since i have used access for anything and I am having problmes getting it to do what i want it to do.
I have 2 tables one which hold the data needed and the other is being used to hold a list of products with prices.
In my main talbe in which the data will be entered into I have a drop down so the product can be selected, once it is selcted i want the next field filled in automaticaly with the price. The look up looks at my products table which hold the price too. I tried with setting the look up based on a query but it get errors about using the same table
I have two columns in the look up field. When I select the lookup value in the form I need value from one column to be displayed in one box and the value from the second column displayed in another box. Is there a simple way to do it? Thanks