Using Ms-Access 2010 on Windows 7 - forms view will not show the lookup table value, just the number ID. The drop-down arrow is non-functional, but works fine in the table view. Table view shows the value - Georgia from States table, drop-down list works, relationships show valid links from employee state field to the States ID. No answers posted address this peculiar problem. Any ideas? Thanks
On the form, do you have StateID as a text box or a combo box? To get your desired behaviour it needs to be a combo box. The properties should be set as per the attached image. Note that only one column width value is set - this means that the first column is hidden (width = 0cm) so you only see the second column. The first column needs to be there though as this is holding the value (StateID) that is being stored on the Employee table
This is one of the issues with the use of Access Look-up fields stored directly in tables. They are very confusing, and worse still not supported in other database formats, so if you upscale to SQL Server or MySql you'll have to convert them all to separate tables anyway.
Create a separate table with your values in and use it as the source for your combo, and store the the StateID in your main table.
There is more of an explaination here http://access.mvps.org/access/lookupfields.htm
Related
I have a table. Table1. Table1.[Field1] displays a lookup field taken from Table2.[Field2].
In my Form I have two comboboxes. Combobox1 is bound to Table1.[Field2].
Remember.... Table1.[Field1] is displaying the "looked up value".
What I want to do is to use a bound Combobox2 so that it displays the looked up value (I have achieved this)... and then, when I change that value using the drop down list in Combobox2 to another value, it changes the record displayed in all my other controls, including Combobox1.
I'm not too sure what settings to use in my properties. Would anyone know how to achieve the above?
Thanks
(MS Access 2010)(Windows 7 Pro)
I'm trying to create an adf query panel with table but I need to limit the search values as also the result values in the table.
For example:
- I have a table with FName, LName, Dateofbirth, address, phone
- I want that the values presented in the search form are FName, Lname
- the values in the result table Fname, Lname, address, phone
I've checked several links including this one enter link description here
But I can't understand how to limit the values.
There are lot of resources available on the internet on how to implement search functionality in ADF. here are few for your reference:
http://www.baigzeeshan.com/2010/04/creating-simple-search-form-in-oracle.html
https://www.youtube.com/watch?v=LAWSfO-7xR8
http://adfnote.blogspot.com/2013/02/create-simple-search-form-in-oracle-adf.html
Normally a search functionality is implemented using a View Critreia, which is created on a View Object. It shows up in Data Control as a Named Criteria under your View Object instance.
While creating the view criteria you can specify the items that you would want to see in the panel as search fields.
When you use (drag and drop) your view criteria as an 'ADF Query Panel with Table' on a page, you get the option to specify the columns you want to see in the results table. You can restrict the number of columns there, or even afterwards by just removing the unwanted columns from your page.
I was able to make it work, by not checking the attribute option 'Queryable'.
This way the it does not appear in the query form,only in the results table.
Thank you all for your help
I am trying to create a report putting a field called contact which has the name of a person. This name is linked directly to another table where I keep all the contacts.
For some strange reason, when I include this name (which in query view displays as the name of the contact), instead of the name appearing, the unique ID number is shown on my report.
As mentioned in the article cited in the above comment, you can use a Combo Box control on your report to do the lookup for you. To see how this can be done, create a new report based on the table containing the lookup field, then drag and drop that field onto the report. That will create a Combo Box control with properties that look something like this:
Row Source: SELECT [Clients].[ID], [Clients].[LastName] FROM Clients;
Bound Column: 1
Column Count: 2
Column Widths: 0";1"
You could use a similar Combo Box control on your actual report to display the client's name rather than their numeric ID value.
Another alternative would be to change the Control Source of the report's Text Box control to have it do a DLookUp() on the table. If the lookup field is named [client] then changing the Control Source of the Text Box to something like
=DLookUp("LastName","Clients","ID=" & [client])
would also work.
I wanted to add to the great answer by Gord:
When using a "web" database (started in Access 2007 I think), you cannot change a report's fields to ComboBox style, nor can you use DLookUp(). (web databases lack a ton of features)
The workaround for this, if you want to create a Web-Report that uses lookup fields, is to create a Web-Query first based on your Web-Table (all the Web-* stuff has a www planet icon over the logo, if you create a new Web-DB in Access 2007+ you'll see what I mean)
So, instead of Table -> Report, you'll have to do W-Table -> W-Query -> W-Report.
Then, the only thing you need to customize to get the data right is the W-Query. Start by trying to reproduce the look in the query to match what you want users to see in the report. Note that here in the query, lookups will work fine (instead of the unique ID's, you get field names like you want). However, this will not carry over to the report. To do that, you gotta get the actual text field name you want into the query:
You should already have one table in your query; start by adding the table that your first lookup field points to. For example, the table I want to print is called Stock_Boards, and it has a lookup field called PCBID_lookup that points to the table Stock_PCBs.
Since you're using lookup fields, there should already be a relationship line between the two tables when you add the second one. If there isn't, something has gone horribly wrong.
Now, see how that line connects two fields on the two different tables? For example, I've got my PCBID_lookup field on my Stock_Boards table, which connects to the ID field on my Stock_PCBs table. If I created a report from this now, PCBID_lookup would be a number, a number that correlates to the ID of a record on Stock_PCBs.
To fix it, I will add the name field I want to show up on the report. In my example, that happens to be a Part Number, rather than the ID. I add the PartNumber field from my Stock_PCBs table to the query, and remove the PCBID_lookup field of the Stock_Boards table from my query.
Since PartNumber is what I want to show up on my report, it effectively replaces the original field (PCBID_lookup)
Repeat for all lookup fields you want in your report.
I had 1 more: I removed the Status field of the Stock_Boards table (which was an ID/Lookup) and added the 'Status' field from the Status table (which was the actual text name)
When finished, your query should look exactly how you want the data to appear, without any special tricks or asking Access to do something unnatural. Save your query, and create a web-report from it. Done!
I have a very large fusion table.Now,i want to query that based on user requirements.My user interface should have one drop down box to select the name of the column and another drop down box for selecting query condition('=','>','<') and one more text box for column value's.please,can any one hep me.Map should be loaded based on this input.
user1225902: You need to call the onLoad function from during page load. I had thesame problem.
Does anyone know a way to have all the rows of one column of a repeating table to always have the same value?
Say the user changes the value in the first row for that column, then all the other cells in that column change to have the new value. (Preferably this will happen if a user changes any cell in the column, not just the one in the first row, but just the first row would be fine if that's all that's possible).
I have access to both InfoPath 2007 and InfoPath 2010 so can use either. The form submits data to and receives data from an SQL Server database. Code is fine if this requires it.
You basically want to change the field from a repeating field to just multiple copies of the same field (since you want it to always be the same there is no point in storing multiple versions).
On the data source tab, all the fields that you put in the repeating section are in a group folder with the little repeating icon on it. Right click on the field you want to be non repeating and choose move. Put it anywhere outside the repeating group folder (the encompassing folder is usually a good choice but it can be anywhere). The field on the design surface will now show a little info box that says "this item can't be repeated" (or similar).
Now you just have multiple copies of the same field - so if you change any one of them they will all update to reflect the value.