I have a form with several drop dpwn lists in it. I want the choice of each on to narrow the choices of the next drop down list.
I have see a few examples on this site on how this is done but at this point I dont understand how to write the information. I have taken what another person had posted and dont really get what to do next. Do I paste the info in the rowsource box and then build the query? The example I saw had expr1 and expr2 in the querys so I was lost.
Thanks, Joe
1st drop down list row source
SELECT DISTINCTROW tblProjects.ProjectID, tblProject.Poject FROM tblProjects ORDER BY tblProjects.Project;
2nd drop down list row source
SELECT DISTINCTROW tblLocations.LocationID, tblLocations.Location FROM tblLocations WHERE (((tblLocations.ProjectID)=[Forms]![frmMain]![cboProjects])) ORDER BY tblLocations.Location;
I have an unbound form with three tabs. On each tab there is a sub form. Each tab is a search form and each sub is a results returned. I have made everything unbound and set the sub form recordsource and its controls control souce on afterupdate of the main form search criteria. Works fine except for after some use the db decides the sub forms are not unbound and sets the record source and control sources.
I've got a form in my database that enables you to print or view reports, which I inherited. There is a list box that is automatically populated with all of the reports listed in the Reports tab of the database window. The list box row source says the following:
SELECT msysobjects.Name FROM msysobjects WHERE (((msysobjects.Type)= 32764));
However, I have been asked to create an identical report list that only shows some reports from the database window.
Does anybody know how I could modify the above code to only get reports beginning frm_id for example?
Hi, i'm having troubles using the wizard to enable me to insert fields all in one form.
I was wondering if anyone know a source code so when i start a new form from scratch, no wizard to help me. That I can use the event procedure to enable me to look up the source or the Control Source using the text field box
Hi all, at the moment all of my field are control sourced. I heard there is a way whereby the field could be unbound and one button it the control source for them all. Im not entirely sure what this means or how to go about it. But i think it would solve the problem of if my users start entering data into a record and then decide to leave it, this record is automatically added to the table, with little or no data. As the data in the table is used for statistics, the table showing records which are not actually there is causing problems. Im not sure if i explained this well, but i would be grateful of any help. Thanx
I have a subform listing items for purchase. Some are services and are not taxable, some are products and are taxable.
So far, I am calculating the sales tax for each record (item paid for), based on whether the thing is taxable or not and putting that result in a text box (txtSales_Tax) on the form. Since these calculated amounts aren't stored in a field, I can't SUM them, since SUM only works on data in table fields. Can someone tell me how to get a total?
Otherwise, I'll get rid of txtSales_Tax entirely, if someone can tell me how to write a SUM function, as a Control Source, that includes an IIf, or a WHERE, so it only adds items where the yes/no field Taxable=True.
I've got an IIf with a SUM function in it but, even in the footer, that only works for the current record. I need a SUM that has a nested IIf or WHERE in order to include all the records.
I have a drop down list of Last name and first name.
I want this to be the only unlocked feature on the page. When a name is selected the other information is shown (the persons cc#, Exp date, phone number, email etc.)
I am almost sure its a control source, but i'm not 100% as i'm relatively new to Access..
Another issue I would like to know is how to show the Last Name, First Name in the selected drop down after its selected, currently its only showing the Last name.
In my contacts datababse I have a main table where all the is stored for my contacts.
I have a form that I use to enter and display the information from, Because I have more the one contact at a given company I have created a seperate table that contains all of the contact details for each office.
What I would like to be able to do is when I select a office on my form Access will populate the the rest of the fields in this section with the relevant information.
I have those (simplified) tables that are linked with an n:m relation
persons:
#ID#FullName#
trainings:
#ID#startDate#
training_members:
#ID#trainingID#personID
Now I created a form to fill the training_members table with the participants. For the form I'm using a dropdown list filled with the names of the people from the persons table. What I now want is that the dropdown list only shows the values that are not already used before. So I changed the SQL statement of the row source property:
SELECT persons.ID, persons.FullName FROM persons WHERE persons.ID Not In (SELECT personID from training_members inner join trainings on training_members.trainingID = trainingsn.ID) ORDER BY persons.FullName;
I also added "me.recalc" to the after_update event of the dropdown list.
It does work - but there's one problem left: The SQL query doesn't include the just selected value. Because only values that are included in the list are accepted, the name of the person isn't shown in the dropdown.
Do you know how I can update the SQL statement so that the just selected entry is as well mentioned in the list? The abovementioned form is displayed as "Continuous Forms", so I don't know if it is possible to access the recordset the dropdowns are located into...
is it possible to change the control source of an unbound text box ?
For example i have a textbox which simply displays the number of current records displayed i.e. =DCount("*", "queryname")
Now i wanted that with the click of a button (or something), i wanted to change it's controlsource to =DCount("*", "queryname2") ... however, as a result i got #name instead of the correct count.
Can I build a form without it having a table or query. All unbound controls? If so how would I preform a OnClick event to populate a combo box using code from one of my tables? Then have the form lookup the values that belong to the value in the combo box after I make a selection?
I have created a new field in a Form and named the Control Source "Active". However, when I vew in Form View there is a "0" in the field and it also does not allow me to type anything in the field.
I have a form with a subform. When i click a button on the "main" form i'm able to change the source object of the subform. But the subform now shows the records which are already present i want the subform to start with a new record.
I have a drop down list of Last name and first name.
I want this to be the only unlocked feature on the page. When a name is selected the other information is shown (the persons cc#, Exp date, phone number, email etc.)
I am almost sure its a control source, but i'm not 100% as i'm relatively new to Access..
Another issue I would like to know is how to show the Last Name, First Name in the selected drop down after its selected, currently its only showing the Last name.
Hi, I am making a form to enter inventory into a database. We have two fields for the location. They are the building and the room. I would like both to be combo boxes, with the choices in the second box being dependant on the choice in the first. IE, if you pick building1 as your building, the row source for the room field would be all the rooms in building1. Know any tricks to do this??
I want to select JPEG's and Visio files to import and viewable in the report format. Can anyone give me an idea of how to achieve this...I have been told I need a control source...
Health-related services are not charged sales tax, but products are.
In order to have one subform to do the job (rather than one for non-taxable and one for taxable items), I'm trying to create separate running sums of taxable and not taxable items from the same query, but am not getting far. "WHERE" statements don't seem to be working in Control Source code.
Currently, there's a cboItem_Name that populates txtItem_Cost. There's txtQuantity and txtExtended_Price. All working fine. The cbo query includes whether the item is taxable or not, from a YES/NO field in the table.
I'm trying to get txtTaxable_Sub_Total to SUM[Item_Cost]*[Quantity] where [Taxable] = YES, but it ain't happenin'.......
Is there a better way to go about this, or can someone suggest correct syntax to me?
If the data source changes for an Access database, do I need to recreate all the tables, queries, and reports? I am having quite a time with this issue. Thanks for any assistance you can provide.
I apologize in advance if the topic below is unsuitable for your boards, and/or this information has already been posted. I've searched the board and could not find an answer.
I recently came upon a program created in VB6 which accesses an external .MDB database. I would really like to view the information inside this access database, however, it was most likely encrypted via code through VB6, and made to be decrypted as a user accesses the information via the program. Currently, the .mdb database displays garbage text, and I was wondering if there was any possible way to view this information via external programs. I recently tried to decompile the .exe file, but have had no such luck in locating the form which may show encrypted source information.
As you can tell, I have no knowledge of VB programming, but would just like to know how I can view this data.
Once again, sorry if you do not cover this sort of topic. If it is of any help, I can attach the actual .mdb file in another post if interested.
I am automating a mail merge with Access to Word. Does anyone know how to stop the Confirm Data Source dialog window from coming up and just except the default (orginal) data source? I have users that do not know they should just click the OK button, some are clicking NO and then I lose the connection because they dont know where the table link is. I dont know what else to do but tell them to always click the Yes button when confirming but not everone listens and then i have to do it all over again.:mad:
I'm in the process of learning to use Access and I would appreciate any help that can be provided. The problem that I am facing is that I have data in three different columns, and this cannot be changed. The database that I am creating links to another database to retrieve a table. This table contains two columns of data that are essentially the same for my purposes. I have also created a new table in my database which houses new data and also this will be the location where new records are be stored. Ideally what I'd like to have is a single table with the information from the three sources stored in a single column that updates as the linked table is changed. Is there a way to do this with a query? or should I be looking into another method? Any help is appreciated. Thanks.
I have o form based on a query that I can search in for last name etc. And then I have a button for opening a report for the person that displays.
Here is the problem now: If I have two persons with the same last name I get a report of several pages also showing the person that is not displayed in the form but have the same last name. What can I do in the query just to get the person only on display showing on the form? ID is the primary key
Here's the root of all my troubles: SELECT EmployeeID, NewStoreID As HomeStore FROM [Store Change] AS SC WHERE EffectiveDate=( SELECT Max(EffectiveDate) FROM [Store Change] WHERE SC.EmployeeID=EmployeeID ); This query works perfectly fine by itself. It's supposed to find the most recent store ID for each employee and it does. However, if I use that query inside another query I get the error, "The Microsoft Jet database engine does not recognize 'SC.EmployeeID' as a valid field name or expression." I've tried changing the original query slightly, but there isn't much I can do without ruining my functionality.
Greetings, I have a search form with a list box that displays query results. Double clicking on a row in the list box opens a detail form with the detail of the selected record. The other way to get to a detail form is by clicking on a command button that displays the detail of each of the records in the query result, one by one. The problem is that there are many more fields in the detail form than the query that is its' control source. Since the detail form displays an individual record, it seems like it should be able to go into the table and fetch the rest of the data. No?