Tables :: Adding More Than One Response To A Field
Dec 20, 2012
I have a table of issues (tblIssues). Each issue has legislation that it must be dealt under. Some issues relate to more than one piece of legislation. Some legislation deals with more than issue. Ideally, therefore, I'd like to have a separate table of legislation (tblLegislation).
Where any issue refers to two (or three) pieces of legislation, can I store that in a single field? Or do I simply need to create a record in tblLegislation for the combined legislation?
I am filling in a database using forms, and I would like to be able to add standard values to any field using a macro/VBA code I don't want to set up a different macro for each field though - I have around 40 different fields (to elaborate, it's a mark database for student projects, each field is a different thing I am commenting on. I want to quickly add 'Missing' or 'Good' to a field - but I also want the option of free text instead.).can't figure how to do it in MS Access.
I am building a DB for my college, it is needed to replace a spreadsheet they have in place. The spreadsheet is used to monitor and track Students grades.
Each unit a student passes gives that student a certain number of points, the number of points depends on the grade (e.g. a student will get more points for a B than they would for a C). The point of the DB is to input all the students grades so that student can see how many points they have.
I was wondering if there is a way to add a value to a field, so if I put in a field that a student got a B grade the database would know how much a B grade is worth points wise. Each field should be added together to generate an overall score. Is this possible?
I'm currently building a database and one of the things that I must make is a "warning", more like a symbol on a continuous form, that is there, if the task is wanted by a costumer.
I have a Yes/No field in database, which decides that. Now I need to figure out how to make it appear on form. I thought about making a calculated field, that would display some warning icon.
Now my question is, is it possible to add an icon to a calculated field and if possible, how?
It's been a while since I've asked a question here, but I can't seem to figure this problem out.
I am setting up a form using data from 4 different tables, all related, and I can't figure out how to add fields that I didn't initially add during the wizard set-up. I used the wizard because it's easier for me to do that and then go in and make the changes I want to make.
When I get data from just one table, all of the available fields from that table are in the "Field List" no matter what fields I chose to include in the wizard process. That's good. But when I get data from more than one table, only the fields I initially chose in the Wizard process are showing up in the field list. I can't figure out how to add a new and different field from one of those tables.
The way I "solved" this problem the first time was to start over, creating my form from scratch--but now that I've done a lot of work, it just occurred to me that I will need to add 2 more fields. (I actually don't even have those fields in a table yet, but I will add them later.) So, this will be an ongoing problem. Since this form will get much use, by several people, I don't want to have to re-create it every time I want to change something.
So, is this possible? How can I add another field?
Also, while I am at it... A combo box was working beautifully to look up specific records when I was gathering information from only one table. It isn't working anymore.
I have a table A in which I write down orders for cars. A record is an order. A single order may contain multiple cars in varying quantities.Each car has its components. Some cars may have some of their components common. There is a table B which indicates each car and its components required with their quantities required to build the car. There is a record for each different car.
Now suppose there is a new car we are going to produce so we need a new record in table B for the car and all its components. Also we need a new field in table A because people can now order the new car(in some quantity).
With form for table B we can introduce a new record. But how can we add a field in table A automatically after a record is added in table B?
My database is almost complete. I am just having trouble with adding a a Required Field to the General Section (down below) in my tables. Two of my tables already have the Required Field there with the drop down Yes/No. My other 2 tables to not have one at all? How to sort/group things in Reports?
I have a database which tracks onsite and offsite files. I need to create a pop up message box using the toggle button function, with a "yes" or "no" response, so when a file is onsite and you click the offsite box, a pop up message box will display the following message, "Are you sure you want this file offsite?" and if yes is clicked, it will switch to the offsite field. If no is clicked, it stay as is, (onsite would be the default). The same thing applies for when a file is offsite and you want to return it onsite, when you click in the onsite box, the pop up message box would display "Are you sure you want this file onsite" if yes is clicked, it will switch to yes, and if no is clicked, it stay as is. Can this be done?
In my database I have many names in alphabetical order. What I want to do is create something where, for example, if I type a 'B' in a text-like box the list of names from the database automatically scrolls/moves to the beginning of the Bs either in table view or preferrably in another text-like box that mirrors the table contents. Then if I enter an 'E' after the 'B' the cursor moves to the beginning of the names with 'BE' in them, and so forth for each additional letter. Each move would happen immediately after each key is pressed, without using the <enter> key, probably like a 'keypress' event. I would appreciate some direction or if someone knows where there might be some existing code or examples.
I have developed a DB for work and it has grown, it is about 60Meg, all of a sudden when I am opening Design View in Reports, or queries it started running really slow.
I always Compact on Close I have Split the DB.
Still no Joy, I have a brand new Dell PC so nothing wrong there.
What is happening? it is a nightmare to get anything done.
The database response is significantly slow when our application requests data over a network. Are there any settings to adjust network response? The network is connected via a T1 line.
According to information I've found online, our application is the front end to the database and the database sits open on the server.
Looking for a way to supress this message box... The text you entered isn't an item in the list.
Select an item from the list or enter text that matches one of the listed items. ... when the NotInList event fires.
Trying to just open an unbound modal form, pass a couple values to it, and set focus on a particular combobox for additional information to be added to my lookup table:
Private Sub cboPostalCode_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_ErrorHandler
Const Message1 = "The postal code you have entered is not currently on record." Const Message2 = "Would you like to add it?" Const Title = "Unknown Postal Code" Const NL = vbCrLf & vbCrLf
If MsgBox(Message1 & NL & Message2, vbQuestion + vbYesNo, Title) = vbYes Then DoCmd.OpenForm "frmPostalCode" Forms!frmPostalCode!cboCountryID = Me.cboCountryID Forms!frmPostalCode!txtPostalCode = NewData Forms!frmPostalCode.SetFocus Forms!frmPostalCode!txtCity.SetFocus Else Me.cboPostalCode.Undo End If
I am new with Access and I am setting up a data base that will have 16 tables and each table with have over 3,000 customers. The reason for 16 tables is that we will be inputting information on a monthly basis for each of these customers (12 of the tables) and I also have 4 tables that will be perfomring different "tasks" for each customer (one is just to keep the notes we make for each customer, one will be to show any billing done, one is going to be a summary of the entire year along with some additioanl information not entered elsewhere and the final one is our customer information table).
The customer account number is the primary key for all of my tables.I want to know how I can add a new customer (either using query or form) at one time that will populate all the tables. Right now I have everything set up as tables but I can set up queries if need be.
I have an 18.8MB Access application consisting of the following: 140 tables 410 Queries 67 Forms 5 Macros 26 Modules
It's not a lot of data storage, but is very computationally and mathematically intensive. As we continue to develop and expand the application, I noticed last week that we suddenly experienced a massive falloff in performance. Access is taking an incredibly long amount of time to traverse the querydefs collection, find objects, etc. It seems that the object collections themselves are not indexed, meaning that it takes a much longer amount of time to run a compiled and saved query than it does to simply build the SQL string and execute from within code. I continue to hunt for coding bottlenecks and any other efficiency problems I can find. Has anyone else experienced this? Is there a "critical mass" for the object containers?
I need to devide the number of Yes responses for Name1 by the total number of responses. I tried doing it like this =(([Name1]=Yes)/sum([Name1])), but that isn't working.
I am using Access 2007 on my front-end and SQL Server 2014 on the back-end. I have a table of Car Dealers and a table of contacts at the dealerships. These tables are SQL tables. The user can select a dealer and then see everyone that works at that dealership. When they look at this there is a field called Email. This is a hyperlink that they can click on to open Outlook and send an email. The table called DealerEmails is an Access table. My table layout is:
DealerEmails ----------------- ID (PK) DealerContactID (FK) Email ModifiedBy ModifiedDate
Now I'm trying to write the code to add a new contact. My code works but I need to obtain the AutoNumber from When I add a new record to the table dbo_DealerContact. My code is:
Code: Option Compare Database Option Explicit Dim adoDealerContacts As New ADODB.Recordset Dim daoDealerEmails As DAO.Recordset Private Sub cmdSave_Click()
[Code] ....
I tried to add Me.Dirty=False, but this still returned a value of 0 into my variable intDealerContactID.
I also tried moving intDealerContactID = .Fields("ID").Value outside of the With block.
I'm aware that there is a command in SQL @@Identity. But I'm unsure how to use it in this context.
Is there a way to get the primary key from dbo_DealerContacts so I can insert that into my Emails table?
I am designing a database to capture the data of returned surveys. I want to design the database to facilitate data analysis through crosstabs or other aggregation queries.
If I design a table where each record is the complete survey responses to all survey items in a returned survey, this is not friendly for such query analysis. (In this, each field would be a survey item). Call this the horizontal method.
The other way would be to have a reference table containing the survey items , and have responses entered in a seperate table linked by item id and response id (from a third table containing a record for each submitted survey). Call this the vertical method. This would take more time to set up but would probably be easier to query.
The item response table would become quite long contaiging every item response for every survey turned although each record is short.
Does anyone have any opinion on this, or perhaps a completely different approach that I haven't thought of that would be easy to set up but also easy to query?
Hey. Basically I have several tables. One table (vistiors) has a combo box in one field called Hostee. Each hostee is listed in another table with all their information. When a hostee is selected in the hostee field of the visitors table I simply need it to count how many people including the currently selected person are being hosted by the person and check if it is greater or less than the amount of people set in the host table which has a field called Limit that has a number which is the maximum amount of people one person is willing to host.
If its greater than the amount in the host table a warning message should come up informing the person (but still allow the assignment to occur.)
As a note I have the combo box set to show the first name of the individual but select both the first name and ID
the code is below for the row source:
SELECT [Hosts].[First Name], [Hosts].[id] FROM Hosts;
If someone could tell me how I could get it to show multiple things within the combo box that'd be great.
IE Right now it shows just a first name liek Alex, Rachel, Bill. I'd like it to show the first name as well as the last name and a third additional field. IE Alex Lastname T1 or Rachel Lastname F4 etc.
Can anyone show me the general code to do this? I do know some VB but I'm used to using SQL with PHP primarily. I am new to access and only know it vaguely. Thanks in advance!
I have a form that records followup activities for protocols. The form allows the user to enter up to six f/u actions from a dropdown menu in six separate fields (called fu1_action, fu2_action, etc).
I am trying to write a query that retrieves only protocols that only have one f/u action selected as "telephone correspondence" and am having trouble. It seems I could write a function in VBA that would somehow loop through the 6 f/u action fields and give a value of 1 to those that have 'telephone correspondence' as a response, and then add them up to give a total of calls for that specific protocol, and then in a separate query only retrieve those that have a total number of calls = 1, but how to get started in writing this.
I have a DB that holds multiple possible email responses, originally set up for just straight up create email based on this information. the Button to created the email works great. Now what I would like to be able to do is Click a 2nd button that instead of creating a new email, it would open a reply to the current opened email. I would still want to push the information to it like it does in the current new email button.
i have a text box which displays the current stock level of an item, when the current stock level reaches 1 i need the font to change colour from black to red. for example, if the stock is 2 - font is black if one item is sold the stock will become 1 - font changes to red
how do i go about this? any help is VERY VERY welcomed and muchly appreciated. thanx alot.
I'm working on a database which is designed to connect to an app called Canvas (www dot gocanvas dot com). It's for a client which runs a team of heating engineers. All the information regarding the engineer's job is uploaded to Canvas through their API as an XML file, and the engineers use an app on tablet to view the job details. When the engineer goes to their customer and does some work, the completed info (which parts were serviced etc) is then downloaded as an XML file via the API into the database. Also, the customer signs on the engineer's tablet to confirm that the work has been done.
Although the XML files for the job data upload and download fine, there's a different API for getting a download of the JPEG which contains the customer signature, and I'm having real problems finding out how to use this.
The API guide says this: ---- The Submissions API is restricted to authenticated users and requires a username and apassword to access. In addition, the ID field is required. If these fields aren't specified, an error is returned.
The result of this webservice invocation will be either a standard JPEG image or an error code.
Example: [URL] ....
All my code (which I've pasted at the foot of this message seems to work fine. There are no errors, and the ResponseBody object appears to contain a byte stream which would be the jpeg... if only I could get it into a jpeg file!
How I go about taking this "stuff" that's come back in the responsebody and actually create a jpeg image file from it? I feel that I'm so close that I can smell it, but can't get the last step!
Here's the existing code :
Code: Sub DownloadImageFile() Dim xhr As Object Dim webServiceURL As String Dim actionType As String Dim PostData As String Dim strResult As String
I have a front end that is connected to three back end files. The front end is on my local computer while the back end files are on a network drive.
There are a lot of calculations that go into the queries and intermediate queries. For a report, I have based it on a UNION query.
But when trying to design the report it takes about 45 seconds just to do any one thing, e.g.; - Add Groupings - Add Grouping Headers//Footer, sorting option - Add bound textbox :eek:
Needless to say this is very annoying. :mad:
The union query itself runs fine (takes about 15 seconds to run) and returns about 12,000 Rows. The union query looks like this (I changed the field names to make it read easier, hopefully);
SELECT a1, a2, a3, a4, a5 FROM qry_A;
UNION SELECT ALL a1, b2 AS a2, b3 AS a3, a4, a5 FROM qry_B;
UNION SELECT ALL a1, c2 AS a2, c3 AS a3, a4, a5 FROM qry_C;
UNION SELECT ALL a1, d2 AS a2, a3, a4, a5 FROM qry_D;
UNION SELECT ALL a1, e2 AS a2, a3, a4, a5 FROM qry_E;
UNION SELECT ALL a1, f2AS a2, tblG.f3 AS a3, tblG.f4 AS a4, a5 FROM qry_F;
One solution I came across when searching the forums was to use an Append Query to append the query results to a table and base my report on that. This does indeed fix the problem.
But what I was wondering if it was is my query design that is causing it to be slow or is it just the fact that I am returning 12,000 rows? :confused:
In case it matters, I wanted to mention that I can’t use the report wizard to create the report. When I select the union query, the fields will be showed for awhile then they just disappear. That in and of itself doesn’t cause any trouble since I am creating the report using the design view and not the wizard.