I have a check box list on my form for all 50 states, so the user can choose any number and any combination of possible states, which I need the user to be able to do, but when it displays the data it does so horzontally and delineated by a comma. The problem with this is that if enough states are selected, it eventually gets cut off at the end and doesn't display the last states. Is there any way to make it instead show vertically, since at least with that I can format around it and not have a horizontal bar going all the way across the form?
I have 2 tables one, Contacts, primary key ContactID this table contains names, addresses etc and one group called Form primary key Form ID, foreign Key Contact ID. I want to store the related contact ID in my form but display firstname ad surname from Contaacts list. This works fine when I am selecting name. List box shows 2 columns with correct data but when I recall the form after making other entries it only displays the firstname. The correct ContactID is stored. Why does this happen.
If I can get this working I would like to concatenate the Firstname and surname to make it more readable but don't know where to begin.
I have a report base on my table. Here a check box. I wanna show two label text hide/show base on when check is true or false. It will be when report will be open. I have try this but nothing is happened.
Code: If AffecteAc= True Then affected.Visible = True general.Visible = False End If
I have a list box (SUB CATEGORY) on my form where I can select multiple items. I have a query (Final) that has this field in it.
Problem - I cannot seem to get the list box selections to appear in the query results. What the "Criteria" should look like or maybe some code that I can try.
On my Class form when assigning students there is a combo box which shows the students names. Once a student is picked in the combo box their name shows up in the subform.
What I would like is a way to NOT show a student in the combo box after they have been selected. Is this possible? Or should I be looking at another way of doing this?
I am making a Car Rental database on Access 2010, and I have a list of the dates available to rent a car in a table. I want to be able to check what dates are available and select a date for hire in a form.
On a form I have a listbox that allows me to navigate around my records. The listbox is filtered and I get the redords that I waqnt from the table.My problem is that when I open the form the record that is showing is one from the table but not one that is in my listbox. I want it to show the first record in the listbox...This is the command I have on open:
Code: DoCmd.GoToRecord , "", acFirst
which is where the fault lies, but I dont know what I should put in its place. The list is List273 and the form is frm_Profile
We have a form that will have one combo box for Associates (like Employee in the OPs DB) which I've got set to show only active Associates for new entry per the tips in the above thread, but we'll also have a combo box for Developer which I need to function the same way. I don't know how to add that part to the On Current event?
Code: Private Sub Form_Current() Dim strComboRowSource As String If Me.NewRecord Then strComboRowSource = "SELECT T_Associates.AssociateID, T_Associates.Associate, T_Associates.Active " & _ "FROM T_Associates " & _ "WHERE (((T_Associates.Active)=True));"
I've created a form with two textboxes and a listbox. What I want to do is to show in the listbox the registers filtered by the 2 textboxes. But I would like that the listbox refreshes while typping in the textboxes.It was no problem to do filtering with only one textbox. The rowsource of the listbox is a query in which I set in the criteria Like [Forms]![Form1]![Textbox1].[Text] & "*"Then I write the code for the change event of the Textbox1:
Private Sub Textbox1_Change() Listbox1.Requery End Sub
With this I have no problem. The problem is when using the 2 textboxes. I write the same in the criteria, Like [Forms]![Form1]![Textbox2].[Text] & "*", on another field but it doesn't work. I also write the code for the second textbox:
Private Sub Textbox2_Change() Listbox1.Requery End Sub
The listbox doesn't filter with both textboxes. When you type in one of them, the listbox filters from it, but when you type in the other textbox, the listbox shows the whole table filtered with the characters of the second textbox.
I have a form called frmStartTimeEntry where a user inputs data using a barcode scanner. In this form there is a field called Part_No where after a value is inserted, I'd like the form to check if table_lines_per_part includes this part. If not found, then I'd like the form to open another form called frmLinesPerPart where the form would pull the same Part_No inserted in the previous form to fill in the Part_No field (which is hidden) and then the user would type in a qty for the LinesPerOrder. A user would then click a button btnOk to append this new record to table_lines_per_part and be returned to the frmStartTimeEntry to continue filling out the rest of the form.
This is the idea I have but I don't know how to code the part where the form checks after update if the part_no exists in the other table, nor how to capture the part_no to the other form and then append both the part_no and the lines per part to the other table.
Code: Branch Officer1 TotalLoans1 Officer2 TotalLoans2 Officer3 TotalLoans3 . . . 1 ABC $5,678,555 DEF $6,678,555 2 GHI $7,678,555 JKL $8,678,555 MNO $9,678,555 There is an indeterminate and ever-changing possible-number-of-Officers per Branch.
If this is not possible using queries, is there a better way than writing code to loop through the recordset to get the desired output?I've done it before where I've written output to text and also to a table using VBA & recordset - but I'd like to know if there is a way I can get Access to do the 'heavy lifting'.
I am trying to do a simple Do-while loop to display master and relevant transactions in form/subform environment under Access 2003.Below are some of my statements:
Dim dbs As DAO.Database Dim TRANS1, TRANS2 As DAO.Recordset Set TRANS1 = CurrentDb.OpenRecordset("Master", dbOpenDynaset) Set TRANS2 = CurrentDb.OpenRecordset("Transaction", dbOpenDynaset)
[code]....
then I ha e a main and subform creation with at least the variable "text456" to ensure the master transaction code (i.e. the transcode) has been located and are in the main form. In the subform that I have created, I have a condition as [forms]![mainform].[text456] under the "transcode" field in relevant query file. I have also checked that in the property of subform, both the child and parent linkages are stored the "transcode" variable.
But when I run the program, it only show the "transcode" in main form but no data showing in the subform.
I have form that is tied to a query. When I enter criteria that matches what i have in the table, it returns the infromation on another form fine.
However, if there is no data for the criteria I am entering, I get a blank form. Is there anyway to have the fields of the form show even when there is no data?
I have a form with a subform. I want to use the main form to insert new data and the subform to show all records that are there. One could say that the after inserting a new record with the fields in the form and save it, it should appear in the subform datasheet view.
I have created a combo box which lists companys, when i click on a certain company it brings all records for that company but underneath the last record it shows all the other records on the form.
How do i get it to only show the records for that company only.
I have a form that each day needs to be filled in by staff of their activities.
By selecting a date, I want to the textbox to display the contents of the comments memo pad field in the table (tblToday...columns are t_date and t_comments).
My very limited access and previous SQL knowledge has eluded me and cannot fathom how to get the text box to show data based on the date selected?
I have a form and this form shows some values from one table. One of the fields named as Key. I want to open another form and show the record that has the same value as Key.
I am able to make this with filter but the form opens and when the user navigates the record, it creates a duplicate value in related table.
I want to open form and find specific data to display and then stop at this record.
I'm looking to select name of a hospital from "HospName" from a list box. If no, then at least to write the name and the rest I'll get it associated with the name.
Then I need to know if I can put this in a form so the form asks same criteria?
I have a check box and I want it to show a picture if it is checked and hide the picture if it not checked. I dont know where to put it either, do I put it in the form load procedure or in the checkbox procedure? Basically I want the user to check the box if it is needed and when they open it later they will see the checked box and the picture.
Here is what I am messing with.
If checkBox.?????? = ? Then imgPicture.visible = True Else imgPicture = False End if
I have a navigation form with a combo box. The combo box has a running list of manifest numbers. I select a manifest number, then click a button that brings up a new form with data related to the selected manifest.
However, I have to click and unclick the 'Toggle Filter' button on the new form to show the correct data each time I open the form.
I have a form with a tabbed control on it. The tabbed control has 4 tabs that each have a report on them. When I select a company name on the main form, I requery these 4 reports to show data related to that company.
For some strange reason, 2 of my reports requery with no problem, and 2 of them give me a message that the report can't be found. Here is the code:
Code: Private Sub cboCompanyName_AfterUpdate() On Error GoTo cboCompanyName_AfterUpdate_Err ' DoCmd.SearchForRecord , "", acFirst, "[CompanyID] = " & str(Nz(Screen.ActiveControl, 0))
' After selecting a company, requery the subreports to display the appropriate data
As a side note, if I chose the company, say "ok" to the error, and then go run the queries that these reports are based on, I get the correct records. Also, if I chose the company and run the 2 failing reports standalone, they work fine, so I know the problem isn't the reports or the queries themselves.
I have also checked and rechecked for any spelling mistakes and have found none. I should mention that the error message is "Programs cannot find the field 'SubrptCompany_Payback' referred to in your expression".