The company's register of projects we select the customer from a combo box that is related to the customer table. However, the way this works now, the individual may choose another customer by mistake, and if this is not corrected at the time the project will be listed with the wrong customer.
I would like to have a feature that when you select a customer receive a message if you are sure this is the right customer and if you answer yes then the customers name is being locked to this project ID.
I am trying to use a combobox called Manufacturer to select which table the combobox called Model gets it's rowsource from using the code below.
Code:
Private Sub Manufacturer_AfterUpdate() If (Me.Manufacturer.Value = "Siemens") Then Me.Model.RowSourceType = "Table/Query" Me.Model.Recordset = "SeimensTable" Me.Model.RowSource = "SELECT Model FROM SeimensTable" Else If (Me.Manufacturer.Value = "Samsung") Then Me.Model.RowSourceType = "Table/Query" Me.Model.Recordset = "SamsungTable" Me.Model.RowSource = "SELECT Model FROM SamsungTable" End If End If End Sub
But when I run the form and select Manufacturer. Combobox Model remains empty. tell me what I'm doing wrong?
I have a continuous subform of 'static data' whose record source is a SELECT query across multiple linked tables.
Most of the fields are locked and purely there for information purposes but I need to be able to allow end users to change one particular field in each record if they need to - choosing a value from a predetermined list (i.e. one of the tables)
Usually, when I need to do this, I add a command button to the subform and use that to open a separate pop-up form specific to that record, from which the user can make whatever changes they like and then update the record. So in this scenario, a simple unbound combobox linked to that table, on that separate form, would work quite easily.
But I would prefer if users could make their changes directly from the subform without (yet another) pop-up form required each time, to make managing these records more fluid and less time-consuming.
So my thought was to use a bound textbox in the continuous subform (to take the existing value for each record), hide it and overlap it with a visible unbound combobox whose row source is the table of available options and whose default value is driven by the hidden bound textbox. And then to use the AfterUpdate event of the combobox to run the UPDATE query on the record in question.
However, while the combobox is getting the correct default value and the correct list items, I can't make a selection from it. Now I am aware there are 'issues' with using a combobox in a continuous subform but I was hoping I could circumvent them by not binding it.
I am currently using the column history to log the history of inputs into a memo field.
But i now need to swap how my database runs and now require a combo box to have the same history function, as this is for a status updates and i require users to only input certain status's.
I no that I cant use the columnhistory command with a combo box.
When selecting a status from the combo box it automatically update the memo field (which will be hidden on the form) so the column history function works.
I am running a access db within a company with about 40 users. I have split the db for multiple users. The only way I have found to fix this problem is to ask the user to close it and reopen it but this is just a quick fix.
Is this cause by our Microsoft servers or is it cause by access. Any help would be great :D
Here is the complet error msg
Could not update; currently locked by user "Admin" on machine 'XXXXXX'
please note that the user is not logged on as "Admin" but as normally user without admin rights.
I have a form in datasheet view and on that form I have a yes/no tick box is it possible that when the tick box is ticked it locks the line from further entry.
I have a combo box in a form that uses a query to access values from a different table, and dispaly them as choices. This works great. The first problem I encountered was if the value that was needed to be entered was not in the list, then there should be an option to add it. I found a couple good examples by using the NotInList definition to achieve this. And it works, when a new value is added, a message box comes up asking to enter the info in the database and the needed form then pops up. But when I close the form, the value is not in the combobox. Now I also researched this for a while, and found out about the function ComboBox.Requery, but I don't know where to put it to work.
Here's a more code definition of what I'm trying to do/have:
Private Sub Building_NotInList(Newdata As String, Response As Integer) If MsgBox("""" & Newdata & """ is not in the customer list. Add it?", 33) <> 1 Then Response = DATA_ERRCONTINUE Exit Sub End If DoCmd.OpenForm "addbldgform", , , , 1 'Data Entry Mode Response = DATA_ERRCONTINUE End Sub
I was thinking about putting the ComboBox.Requery inside the AfterUpdate of a field in the addbldgform, so that when a new entry was added it would update by writing this in the AfterUpdate:
Form!buildingPractice!BuildingID.Requery
but that gives me an error saying that the field buildingPractice can't be found, when it is really a form with the value BuildingID (the name of the combobox that needs to be updated)
Sorry about the long definition, I just wanted to be clear, hope someone can help out.
I have a form called NewRequisitions that had a combobox in which the users select the Supplier (name, address, shipping details). I created a button to open a subform called NewSupplier so that they can add a new supplier to the Supplier table as needed. My code works okay for the first "NewSupplier" entry - the table and combobox are both updated and the new supplier is available for selection in the dropdown list. However, when there is a 2nd record that needs a NewSupplier added the combobox list doesn't get refreshed. The record is added into the table okay but you can only view it if the NewRequisitions (main) form is closed and then reopened.
Here is the code in my subform:
Private Sub Form_Close()
If CurrentProject.AllForms(NewRequisitions).IsLoaded Then
'save the record if there have been any changes If Me.Dirty Then Me.Dirty = False
'requery combobox on other form Forms!NewRequisitions!ComboSupplier.ReQuery
'yield to other events - and put the new list into use DoEvents
I currently have a table with two important fields (lets call them X and Y) currently I have them set to ComboBox where they reference two look up tables. I then have a form that allows for user input. Each of the two fields work with drop down lists. What I want to to is filter the Y Field based on the selection in Field X.
I wrote a query that is set to the Second combo box. WHen the user selects the drop down it runs the query and uses the value in the first to narrow the selection. [forms]![DATA_ENTRY]![HOUSE_NUMBER] THis works great but only for the first go through. After that it seems that I have to have code on one of the events. Basically any time the user hits the drop down I want to requery.
Does anyone have any code examples that I can reference that will show me how to repopulate that second combobox based on the selection from the first combobox? EVERY TIME I CLICK THE SECOND DROP DOWN BOX ....I would imagine that I have write the code on one of its events...
Hello, I ran into another programming road block. I currently have a combo box that is bound to a table with 2 fields and has 4 different options/records in it, with an after update procedure, that has different calculations for each record. I want to add a Dlookup command that will display the record that is chosen and it will need to be placed in the after update procedure of the combo box also. Is this possible?
Code that is currently in the after update procedure of the combo box.
Dim prp As Property, ctl As Control
Set prp = Me!cboRidge.Properties("ListIndex") Set ctl = Me.txtRidgetot
If prp = 0 Then ctl = ([txtridge]*100/30)+0.4 ElseIf prp = 1 Then ctl = ([txtridge]*100/45)+0.4 ElseIf prp = 2 Then ctl = ([txtridge]*100/30)+0.4 Else ctl = ([txtridge]*100/30)+0.4 End If
I have a form that has a combobox and a field text. If i select any value in combobox i want to update the txtBox but not with the ID of the selection. I need to get the description of the combobox selection which is essentially the Column 2.
I want to lock a form but keep it visible when a 2nd form opens in front of it. I would also like to keep the 2nd form on top. How to do these 2 things?
I'm still using Access 2003 to manage our membership database, is it possible to lock a field(member's name) if the membership is equal to withdrawal or terminated? Possible to use "on click"?
Is it possible to lock a field in a form after the user has populated the field? So for example, I have two date fields and I want them to be locked after the user has entered values on those fields. I want to avoid the user to come back in the future and change those fields. However I would like the database administrator to be able to change those dates when needed. How do I do this?
I have a check box on a form,that when ticked ,Iwant it to lock that check box (basically i dont want that info altered after this time) I know its something to do with the property but cant get it to lock the check box).
I have a combobox on a form which is populated from a field to present a list for the user to choose from.
I have limit list set to 'N'
When the user types something in the combobox that is not in the field in the table then I want to prompt for a password. Effectively password protecting the update of the field from a combobox.
If the password is correct the text is written to the field in the table and if not then not.
I have a combo box which gets its values from sql server using a query which is called "get_query_reason", which works fine. Now I want to update combo box values based on a user selection, st string. Have written the code, but does not work:
Dim qDef As QueryDef Dim Query As String Dim st As String Dim rs As Recordset st = "SOV" Set qDef = CurrentDb.QueryDefs("get_query_reason")
I have been spending all my today to fill a combobox dynamically, but have not been able yet.
I have a combobox and a pass-through query in access, which is working fine and fill the details into the combobox via data source. Now what I am planning to do is to update the combobox source as soon as value in a text box changes.
Here is the code I am using, but it is not working:
Dim rs As Recordset Dim qDef As QueryDef Set qDef = CurrentDb.QueryDefs("get_data") qDef.SQL = "SELECT Initial + ' (' + Name + ')' uws FROM EM.dbo.UW" _ & " WHERE lob = '" & addSingleQuotation(Me.CMB_LOB.Value) & "'"
Me.cmbUM.RowSource = qDef.SQL Me.cmbUM.Requery
I also used Recordset, but did not work:
Set rs = CurrentDb.OpenRecordset("get_data") Me.cmbUM.RowSource = rs!uws
I am having a problem running a make table query which is based on the same tables that I am using in a sub form.
Basically, the user selects certain records in the subform (which is in datasheet mode) using a check box, then once selected he hits a command button where there is some code that will run the make table query, which I use to filter other tables in a related reports.
However I keep getting this silly "database engine could not lock table" message relating to the sub form name. The subform is not linked to any records in the main form as the main form is unbound.
The solutions offered by putting DoEvents or Me.refresh/Me.requrey in the code do not work.
I have several forms in my database that have a closed (1=Closed) option button. Is there a way to make all of the fields for that record readonly if the closed option is set to equal 1?