I am trying to create a query which show me which of my customers in my database does not also contact a contact to go with it.
I have two tables; Customers and Contacts.
When I create a query I add the fields Company Name from the Customers Table and First Name from the Contacts Table. There are obviously other fields in both tables.
However when I run the query it does not not show me all the results. It only shows me customers if something has been entered into any of the fields in the contacts table for that Customer. I suppose this triggers a contact ID entry for that customer even if no Name has been entered.
However, how do I run a query to show me customer entries which have no contacts to go with them because no contact entry has been made for that customer?
Yes, another of my query troubles. I am running a query that is showing the number of demos booked, number of demos executed, then the percentage of demos executed. I have 2 demos that have 1 or 2 booked, but they have not been executed. They should show up in the query so I can get a percentage for them, but they do not. Here is my SQL:
SELECT [Promo count].PromoNo, [Promo count].[# of Demos], Count(Query6.Status) AS CountOfStatus, IIf([CountOfStatus]=0,0,[CountOfStatus]/[# of Demos]) AS Percentage FROM [Promo count] INNER JOIN Query6 ON [Promo count].PromoNo = Query6.PromoNo WHERE (((Query6.Status)="E")) GROUP BY [Promo count].PromoNo, [Promo count].[# of Demos];
Im trying to sort a form on a date. it only has dates put in once a confirmed date is known so when i sort all the blanks come to the top is there a way of sorting excluding null values
Hi, first of all I have to say I'm quite a noob at Access, so I apologise if my question seems stupid. :p I Googled for quite a bit looking for a solution but couldn't really get anything to work (maybe because I wasn't doing some of the possible solutions correctly?).
Anyway, I have a database with two tables, and I'm trying to make a QBF to search for data from these two tables. Quite a few of these entries have null values.
SELECT [M-Table].Firstc, [M-Table].Secondc, [S-Table].Thirdc FROM [M-Table] LEFT JOIN [S-Table] ON [M-Table].Firstc = [S-Table].Firstc
WHERE
((([M-Table].Secondc) Like "*" & [Forms]![interface]![TxtSecondc] & "*") AND (([Forms]![interface]![TxtFirstc]) Is Null) AND (([Forms]![interface]![TxtThirdc]) Is Null))
OR ((([M-Table].Firstc) Like "*" & [Forms]![interface]![TxtFirstc] & "*") AND (([Forms]![interface]![TxtThirdc]) Is Null) AND (([Forms]![interface]![TxtSecondc]) Is Null))
OR ((([S-Table].Thirdc) Like "*" & [Forms]![interface]![TxtThirdc] & "*") AND (([Forms]![interface]![TxtFirstc]) Is Null) AND (([Forms]![interface]![TxtSecondc]) Is Null))
OR ((([M-Table].Firstc) Like "*" & [Forms]![interface]![TxtFirstc] & "*") AND (([M-Table].Secondc) Like "*" & [Forms]![interface]![TxtSecondc] & "*") AND (([Forms]![interface]![TxtThirdc]) Is Null))
OR ((([M-Table].Secondc) Like "*" & [Forms]![interface]![TxtSecondc] & "*") AND (([S-Table].Thirdc) Like "*" & [Forms]![interface]![TxtThirdc] & "*") AND (([Forms]![interface]![TxtFirstc]) Is Null))
OR ((([M-Table].Firstc) Like "*" & [Forms]![interface]![TxtFirstc] & "*") AND (([M-Table].Secondc) Like "*" & [Forms]![interface]![TxtSecondc] & "*") AND (([S-Table].Thirdc) Like "*" & [Forms]![interface]![TxtThirdc] & "*"))
OR ((([M-Table].Firstc) Like "*" & [Forms]![interface]![TxtFirstc] & "*") AND (([S-Table].Thirdc) Like "*" & [Forms]![interface]![TxtThirdc] & "*") AND (([Forms]![interface]![TxtSecondc]) Is Null));
This really long and tedious code was the only way I could get it to work such that in my query form, if I leave any one of the fields blank the search will still pull all the related results out, regardless of whether there are nulls in the values themselves, e.g. if I search for anything with "ab" in Secondc, it will give me all the data with "ab" in Secondc, even if there are null values for those entries in Firstc and Thirdc. Similarly for searches with the other fields.
I tried using IIF and Nz, first using IIF under Criteria, then I read somewhere that they should be used under Field rather than Criteria, but I couldn't really get it to work. Either the QBF wouldn't return any results, or it would return only those entries without null values, so if I searched for "ab" in Secondc, I wouldn't get the entries that had "ab" in Secondc but null values in either Firstc or Thirdc.
The problem with my solution is that I wouldn't be able to get it to work in another database with like 10 fields. The number of combinations would be a killer...
I have a form that feeds information to a query which in turn sets up a report. For clarity i will list out in basic terms what I have
Input Form - Check Box to activate/De-activate a text field [chk-active] - Text field for a parameter [txt-Parameter]
the query has a column that has null values from the originating table. These values will be added a t a later date, but need to be queried and reported at some business intervals.
In the query criteria for this column, I have the following Criteria
Like IIF([Forms]![ReportGenerator]![chk-Active]=0, "*", [Forms]![ReportGenerator]![txt-Parameter])[/I][/I]
I have tried for the last 5 hours to figure out how to write the formula to be able to get the blank entries to show up as well but have had no luck.
I have a Membership List Table with a calculated field entitled Member Name.
The second table entitled Groups contains only 46 records each of which has up to 30 Fields also containing member names.
I Have written a query to establish which of the members from the single field of the first table do NOT featured in any of the fields and records of the second table. In the Query Design View I have listed 'Member name' from Table 1 followed by all the relevant member fields from Table 2, carrying the criteria 'Is Null'.
When I run the query, it merely lists all the members from Table 1.
I've built a form on my Access database that invites a user to enter a start date and an end date into two textboxes. When i press a command button, a parameter query runs which uses the two textboxes as the parameter's criteria. However, to ensure that both textboxes have a data entry, i have tried entering in some VBA that prompts the user to enter in a date if its left null...then set focus to that textbox: Here it is...
If IsNull(Me.txtWeight1) Then MsgBox "You must enter a minimum weight!" Me.txtWeight1.SetFocus Else If IsNull(Me.txtWeight2) Then MsgBox "You must enter a maximum weight!" Me.txtWeight2.SetFocus Else If IsNull(Me.txtWeight1) And IsNull(Me.txtWeight2) Then MsgBox "You must enter a min and max weight!" End If
This will not compile for me! I've tried with and End If and without an End If and other stuff. Why won't it work?
I have a database that I have successfully replicated. It includes forms, queries and tables. Synchronizing works and all is good, but.....from what I keep reading on this forum, this is not the proper way to do it. It sounds like what I should be doing is splitting my database before replicating, and then just replicating the back-end.
When I do this, I find that when using the forms, etc. in the front end, I am unable to synchronize to the back end. I don't even have the option to do it through the menu options.
How do I make the front end recognize that the backend is replicated??
I have a command button opening a separate form from my main form page. After I enter in data in the main form, hit the command button and enter data in the second form. When I close this form I get the error message "you can't add or change a record because a related record is required in table "master table'. In my master table I have a primary key called "ID" set to autonumber. I believe the problem is this field should be replicated to the secondary table but it's not. How can I fix this?
I would like to be able to replicate the unique ID typed on form1 to all subsequent forms without having type it in. Is there a way to do this automatically? Any help gratefully accepted...JimT
I am currently looking for a way to add data in a form with picture and then be able to view all entries with data.
Basically what I want to see is "product image > item number > client > description > material" with for example 500 entries, i want to be able to see a whole list of all entries. I would like to be able to make every entry as described above.
This Access database is Web Compatible and is hosted on SharePoint. I have a form with a subform that display collections of records. As you can see in the attached image, the user selects a record from the combo box which filters the form/subform below. Each record will contain more than 1 item.
What I want to do is mimic a "Split Form". But, the last thing that is missing is being able to select an item from the subform (datasheet view) which displays several items in the record and have that item be displayed in the form. Currently, I have to use the record selector buttons at the bottom of the form to have the item I want displayed in full. But I want to be able to click the item in the subform and have it populate in the main form on this page.
I am trying to automate a data match I've been doing in Excel into Access.
Basically, I have 2 spreadsheets:
1. First has a "Start Date" for each user 2. Second spreadhsheet is a lookup table with 2 fields: Week Start Date and Week #. In other words, Dec 30 - Week 1, Jan 6 - Week 2, Jan 13-Week3, etc
For a given date in the first spreadsheet (e.g. Jan 10th), I am trying to figure out which week this falls into. In Excel I use this formula where Column A stores the week start dates in the lookup table spreadhseet and Column B stores the Week#, with F4 being the "Start Date" in my first spreadsheet.
I have a form that collects data, it works perfectly and writes all inputted data to the table. I have made the same form but using the data web page wizard.
It works fine but when i look at the table, some of the data is missing. there are 12 fields to complete, (all drop down boxes) I have one table which contains the employees ID number and name.
When the id number and name and picked from the drop down box on the web page, they are listed and fine. The record gets added and no problem.
However, go an look at the data in the table and for some reason the employee ID number is present but the name field is blank?? It has not copied the data across.
Even more confusing (currently a test system) if i delete all the data in the table, it works for the first entry, i.e the web page populates the name field but only for the first entry. After that the name field remails blank.
Any suggestions? I have already deleted and re added all the table fields that relate to name and id number and still the same error. I have used the wizard to make several pages and the same problem with all of them. I am baffled why it just refuses the one field and all the others are fine.
Hi! I'm new here and have a little bit of experience w/ access...
I have a problem... I've created a form in my db but when I go to view it (not in design view) the information in the detail area is not there? The problem is not unique to this db either, I have this problem in another... Any ideas? All help is appreciated.
I have system that developed by using Ms Access which has been used for 2 years. But last week, data in one of my table missing in the half way when user do the data entry. There is header table and the details table in the form. All record of the header table were gone but the details record was not problem.
Why all data in table were missing? Please give some guidance.
I am a beginner using Access 2007. The custom written program that I am using has a minor glitch. The report has a subform inside the main report. In this subform is a form header, detail, form footer. The information that is entered into the main report that transfers to the form header, detail, and form footer works and that data is saved with no problems. When I go to create a pdf file from this report all the data transfers to the printed pdf except the information in the form footer. I have looked at the property pages and compared all the properties and they are all identical.
Below is a screen shot of the report in the design view. The areas circled in red are the data that is missing from the pdf when printed. The area in green prints correctly as well as the main body of the report. We insert comments in the comment section and also type initials in the signature section but this do not show up when printed in the pdf. The database saves the information that is input but does not print it. Not everything in the company has access to the database so this is the reasoning for generating a pdf so that it is placed on the company drive for everyone to see.
I have two tables table1 his a master list of companies that I have already delt with table2 is a list of companies that I have delt with as well as new companies and I allow for multiple instances of company data to be in table2
table2 my have several records refering to "ABCD Inc" but table1 will only have it once
If new companies show up in table2 how can I get a mass copy of all the companies that are in table2 but not in table1 into table1?
I have a query which combines several linked tables, the query has about 10 columns, I need to show only the records which have one or more empty fields.
Some records may only have one missing field others may have several.
I want to use a column in a query to show where data is missing in other fields.
In excel I have used this statement:
=IF(COUNTA(I5:J5)=2,"","error")
Basically, I have two fields PRICE and WEIGHT. I want a column in the query to show 'Error' (or any kind of flag) when either (or both) of these fields are blank.