Unbound combobox AfterUpdate

Hi

On some form I have several unbound combobox controls. Whenever some of them 
is changed, I want:
1. reset the values for other combos on same form;
2. reset Filter and FilterOn properties for subform on same form;
3. reset Rowsource for a record locating combobox on this subform.

Currently I use combo's AfterUpdate's events for this - like here:

Private Sub Combo1_AfterUpdate()
        Me.Combo2 = 0
        Me.Combo3 = 0
        If Nz(Me.Combo1, 0) = 0 Then
            Me.MySubform.Form.Filter = ""
            Me.MySubform.Form.FilterOn = False
            Me.MySubform.Form.SubformCombo.RowSource= "SELECT MyTable.ID, 
MyTable.SomeText FROM MyTable ORDER BY 2;"
        Else
            Me.MySubform.Form.Filter = "ID1 = " & Me.Combo1
            Me.MySubform.Form.FilterOn = True
            Me.MySubform.Form.SubformCombo.RowSource = "SELECT MyTable.ID, 
MyTable.SomeText FROM MyTable  WHERE MyTable.ID1 = " & Me.Combo1 & " ORDER 
BY 2;"
            ' different combos set WHERE condition to different ID-field 
here
        End If
End Sub


The problem is, those events are fired whenever something on combo is 
selected - even when the combos value really remains same.

I want, that event will be fired only, when some combo's value was really 
changed, and I can't use OldValue property here, as this works only with 
bound controls (for unbound controls it is always same as controls current 
value). So I need something along lines:

Private Sub Combo1_AfterUpdate()
    If Combo1 was changed Then
        ' Code above will be inserted here
    End If
End Sub


Some ideas anyone?
Thanks in advance!
Arvi Laanemets 

0
Arvi
3/30/2010 6:41:53 AM
access.forms 6864 articles. 2 followers. Follow

7 Replies
1219 Views

Similar Articles

[PageSpeed] 3

Have you looked into using a search form instead of trying the difficult 
task of keeping the combos updated every time one of them is changed.
It would be much easier and less time consuming for you.
Here is a link to a sample
http://allenbrowne.com/ser-62.html



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"Arvi Laanemets" <garbage@hot.ee> wrote in message 
news:uvXIXQ9zKHA.4656@TK2MSFTNGP05.phx.gbl...
> Hi
>
> On some form I have several unbound combobox controls. Whenever some of 
> them is changed, I want:
> 1. reset the values for other combos on same form;
> 2. reset Filter and FilterOn properties for subform on same form;
> 3. reset Rowsource for a record locating combobox on this subform.
>
> Currently I use combo's AfterUpdate's events for this - like here:
>
> Private Sub Combo1_AfterUpdate()
>        Me.Combo2 = 0
>        Me.Combo3 = 0
>        If Nz(Me.Combo1, 0) = 0 Then
>            Me.MySubform.Form.Filter = ""
>            Me.MySubform.Form.FilterOn = False
>            Me.MySubform.Form.SubformCombo.RowSource= "SELECT MyTable.ID, 
> MyTable.SomeText FROM MyTable ORDER BY 2;"
>        Else
>            Me.MySubform.Form.Filter = "ID1 = " & Me.Combo1
>            Me.MySubform.Form.FilterOn = True
>            Me.MySubform.Form.SubformCombo.RowSource = "SELECT MyTable.ID, 
> MyTable.SomeText FROM MyTable  WHERE MyTable.ID1 = " & Me.Combo1 & " ORDER 
> BY 2;"
>            ' different combos set WHERE condition to different ID-field 
> here
>        End If
> End Sub
>
>
> The problem is, those events are fired whenever something on combo is 
> selected - even when the combos value really remains same.
>
> I want, that event will be fired only, when some combo's value was really 
> changed, and I can't use OldValue property here, as this works only with 
> bound controls (for unbound controls it is always same as controls current 
> value). So I need something along lines:
>
> Private Sub Combo1_AfterUpdate()
>    If Combo1 was changed Then
>        ' Code above will be inserted here
>    End If
> End Sub
>
>
> Some ideas anyone?
> Thanks in advance!
> Arvi Laanemets 


0
Jeanette
3/30/2010 7:34:58 AM
Hi



"Jeanette Cunningham" <nnn@discussions.microsoft.com> kirjutas s�numis news: 
OdPd9u9zKHA.4328@TK2MSFTNGP04.phx.gbl...
> Have you looked into using a search form instead of trying the difficult 
> task of keeping the combos updated every time one of them is changed.
> It would be much easier and less time consuming for you.


It's not for finding some record - the user will work with some selection 
from data in contionous form.

The database keeps track of maintenance tasks for certain objects . Objects 
are addressed semi-levelly (area>building>room>object). Any object can have 
many different maintenance tasks, which can be assigned to different 
workers. In subform, user will have a list of maintenance works, and combos 
are used to limit records available for editing. I.e. the user can edit 
maintenance tasks applied for certain worker, or maintenance works in 
certain room/building/area, etc. It's essential, that user has an overview 
of all other selected tasks, when editing a specific one.

Currently I have simplified the code considerabely, allowing only ONE combo 
to have some non-zero value at any time, so keeping them updated isn't too 
difficult. There is no need for more complex filters currently, and to 
remove all filters it is sufficient to change a non-zero combo to zero (OK, 
at moment setting ANY combo to zero will remove all filters - what I want to 
avoid).


Arvi Laanemets 

0
Arvi
3/30/2010 8:37:50 AM
Other than what Jeanette said you could try storing the values of the combos 
in Module level variables and comparing these values in the combo after 
update events.  I've assumed the combos values are long integers.

So in the Declarations section of the Form module:
Dim mlngCbo1 As Long, mlngCbo2 As Long etc

If the combos have default values when the form opens then set these 
variables in the Form's Load event:
mlngCbo1 = Whatever etc.

Then in the combos' After Update events compare the module level variables 
with the combo values and update as necessary

Jon


"Arvi Laanemets" <garbage@hot.ee> wrote in message 
news:uvXIXQ9zKHA.4656@TK2MSFTNGP05.phx.gbl...
> Hi
>
> On some form I have several unbound combobox controls. Whenever some of 
> them is changed, I want:
> 1. reset the values for other combos on same form;
> 2. reset Filter and FilterOn properties for subform on same form;
> 3. reset Rowsource for a record locating combobox on this subform.
>
> Currently I use combo's AfterUpdate's events for this - like here:
>
> Private Sub Combo1_AfterUpdate()
>        Me.Combo2 = 0
>        Me.Combo3 = 0
>        If Nz(Me.Combo1, 0) = 0 Then
>            Me.MySubform.Form.Filter = ""
>            Me.MySubform.Form.FilterOn = False
>            Me.MySubform.Form.SubformCombo.RowSource= "SELECT MyTable.ID, 
> MyTable.SomeText FROM MyTable ORDER BY 2;"
>        Else
>            Me.MySubform.Form.Filter = "ID1 = " & Me.Combo1
>            Me.MySubform.Form.FilterOn = True
>            Me.MySubform.Form.SubformCombo.RowSource = "SELECT MyTable.ID, 
> MyTable.SomeText FROM MyTable  WHERE MyTable.ID1 = " & Me.Combo1 & " ORDER 
> BY 2;"
>            ' different combos set WHERE condition to different ID-field 
> here
>        End If
> End Sub
>
>
> The problem is, those events are fired whenever something on combo is 
> selected - even when the combos value really remains same.
>
> I want, that event will be fired only, when some combo's value was really 
> changed, and I can't use OldValue property here, as this works only with 
> bound controls (for unbound controls it is always same as controls current 
> value). So I need something along lines:
>
> Private Sub Combo1_AfterUpdate()
>    If Combo1 was changed Then
>        ' Code above will be inserted here
>    End If
> End Sub
>
>
> Some ideas anyone?
> Thanks in advance!
> Arvi Laanemets 


0
Jon
3/30/2010 10:44:04 AM
What about

Private Sub Combo1_AfterUpdate()
  If (Nz(Me.Combo1, 0) = 0 And Me.MySubform.Form.FilterOn = True) _
    OR (Me.MySubform.Form.Filter <> "ID1 = " & Me.Combo1) Then
' You need a new filter
    Me.Combo2 = 0
    Me.Combo3 = 0
    If Nz(Me.Combo1, 0) = 0 Then
      Me.MySubform.Form.Filter = ""
      Me.MySubform.Form.FilterOn = False
      Me.MySubform.Form.SubformCombo.RowSource= _
        "SELECT ID, SomeText " & _
        "FROM MyTable ORDER BY 2;"
    Else
      Me.MySubform.Form.Filter = "ID1 = " & Me.Combo1
      Me.MySubform.Form.FilterOn = True
      Me.MySubform.Form.SubformCombo.RowSource = _
        "SELECT ID, SomeText FROM MyTable " & _
        "WHERE ID1 = " & Me.Combo1 & " ORDER BY 2;"
    End If
  End If
End Sub


-- 
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Arvi Laanemets" <garbage@hot.ee> wrote in message 
news:uvXIXQ9zKHA.4656@TK2MSFTNGP05.phx.gbl...
> Hi
>
> On some form I have several unbound combobox controls. Whenever some of 
> them is changed, I want:
> 1. reset the values for other combos on same form;
> 2. reset Filter and FilterOn properties for subform on same form;
> 3. reset Rowsource for a record locating combobox on this subform.
>
> Currently I use combo's AfterUpdate's events for this - like here:
>
> Private Sub Combo1_AfterUpdate()
>        Me.Combo2 = 0
>        Me.Combo3 = 0
>        If Nz(Me.Combo1, 0) = 0 Then
>            Me.MySubform.Form.Filter = ""
>            Me.MySubform.Form.FilterOn = False
>            Me.MySubform.Form.SubformCombo.RowSource= "SELECT MyTable.ID, 
> MyTable.SomeText FROM MyTable ORDER BY 2;"
>        Else
>            Me.MySubform.Form.Filter = "ID1 = " & Me.Combo1
>            Me.MySubform.Form.FilterOn = True
>            Me.MySubform.Form.SubformCombo.RowSource = "SELECT MyTable.ID, 
> MyTable.SomeText FROM MyTable  WHERE MyTable.ID1 = " & Me.Combo1 & " ORDER 
> BY 2;"
>            ' different combos set WHERE condition to different ID-field 
> here
>        End If
> End Sub
>
>
> The problem is, those events are fired whenever something on combo is 
> selected - even when the combos value really remains same.
>
> I want, that event will be fired only, when some combo's value was really 
> changed, and I can't use OldValue property here, as this works only with 
> bound controls (for unbound controls it is always same as controls current 
> value). So I need something along lines:
>
> Private Sub Combo1_AfterUpdate()
>    If Combo1 was changed Then
>        ' Code above will be inserted here
>    End If
> End Sub
>
>
> Some ideas anyone?
> Thanks in advance!
> Arvi Laanemets 


0
Douglas
3/30/2010 11:40:06 AM
Thanks! And this info was there all the time - directly under my nose :)))

I modified your approach a little, and now it is :

Private Sub Combo1_AfterUpdate()
    If Nz(Me.Combo1, 0) = 0 _
                       And Nz(Me.sfObjektRuumid.Form.Filter, "") <> "" _
                       And Left(Nz(Me.sfObjektRuumid.Form.Filter, ""), 3) = 
"ID1" Then
        ' There was a filter based on this control earlier -
        ' so the control was not zero - and the and it was set to zero,
        ' ergo the filter has to be removed.
        Me.Combo2= 0
        Me.Combo3= 0
        Me.MySubform.Form.Filter = ""
        Me.MySubform.Form.FilterOn = False
        Me.MySubform.Form.SubformCombo.RowSource = _
                       "SELECT ID, SomeText FROM MyTable ORDER BY 2;"
    ElseIf Nz(Me.Combo1, 0) <> 0 _
                       And Nz(Me.sfObjektRuumid.Form.Filter, "") <> "ID1 = " 
& Me.Combo1Then
        ' The control was zero or it had previous value different from 
current one,
        ' and a non-zero value was selected - so a (new) filter is applied.
        Me.Combo2= 0
        Me.Combo3= 0
        Me.MySubform.Form.Filter = "ID1 = " & Me.Combo1
        Me.MySubform.Form.FilterOn = True
        Me.MySubform.Form.SubformCombo.RowSource = _
                       "SELECT MyTable.ID, MyTable.SomeText FROM MyTable 
WHERE MyTable.ID1 = " _
                       & Me.Combo1 & " ORDER BY 2;"
    End If
    ' Any remaining contitions mean not covered above indicate,
    ' that control value was not changed - so no action is taken.
End Sub


Arvi Laanemets


"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> kirjutas s�numis 
news: eFrJA3$zKHA.4328@TK2MSFTNGP04.phx.gbl...
> What about
>
> Private Sub Combo1_AfterUpdate()
>  If (Nz(Me.Combo1, 0) = 0 And Me.MySubform.Form.FilterOn = True) _
>    OR (Me.MySubform.Form.Filter <> "ID1 = " & Me.Combo1) Then
> ' You need a new filter
>    Me.Combo2 = 0
>    Me.Combo3 = 0
>    If Nz(Me.Combo1, 0) = 0 Then
>      Me.MySubform.Form.Filter = ""
>      Me.MySubform.Form.FilterOn = False
>      Me.MySubform.Form.SubformCombo.RowSource= _
>        "SELECT ID, SomeText " & _
>        "FROM MyTable ORDER BY 2;"
>    Else
>      Me.MySubform.Form.Filter = "ID1 = " & Me.Combo1
>      Me.MySubform.Form.FilterOn = True
>      Me.MySubform.Form.SubformCombo.RowSource = _
>        "SELECT ID, SomeText FROM MyTable " & _
>        "WHERE ID1 = " & Me.Combo1 & " ORDER BY 2;"
>    End If
>  End If
> End Sub
 

0
Arvi
3/30/2010 2:39:49 PM
There should be no need for Nz(Me.sfObjektRuumid.Form.Filter, "")

Filter is a string value, which means its value can never be Null.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Arvi Laanemets" <garbage@hot.ee> wrote in message 
news:%23rifbbB0KHA.3572@TK2MSFTNGP02.phx.gbl...
> Thanks! And this info was there all the time - directly under my nose :)))
>
> I modified your approach a little, and now it is :
>
> Private Sub Combo1_AfterUpdate()
>    If Nz(Me.Combo1, 0) = 0 _
>                       And Nz(Me.sfObjektRuumid.Form.Filter, "") <> "" _
>                       And Left(Nz(Me.sfObjektRuumid.Form.Filter, ""), 3) = 
> "ID1" Then
>        ' There was a filter based on this control earlier -
>        ' so the control was not zero - and the and it was set to zero,
>        ' ergo the filter has to be removed.
>        Me.Combo2= 0
>        Me.Combo3= 0
>        Me.MySubform.Form.Filter = ""
>        Me.MySubform.Form.FilterOn = False
>        Me.MySubform.Form.SubformCombo.RowSource = _
>                       "SELECT ID, SomeText FROM MyTable ORDER BY 2;"
>    ElseIf Nz(Me.Combo1, 0) <> 0 _
>                       And Nz(Me.sfObjektRuumid.Form.Filter, "") <> "ID1 = 
> " & Me.Combo1Then
>        ' The control was zero or it had previous value different from 
> current one,
>        ' and a non-zero value was selected - so a (new) filter is applied.
>        Me.Combo2= 0
>        Me.Combo3= 0
>        Me.MySubform.Form.Filter = "ID1 = " & Me.Combo1
>        Me.MySubform.Form.FilterOn = True
>        Me.MySubform.Form.SubformCombo.RowSource = _
>                       "SELECT MyTable.ID, MyTable.SomeText FROM MyTable 
> WHERE MyTable.ID1 = " _
>                       & Me.Combo1 & " ORDER BY 2;"
>    End If
>    ' Any remaining contitions mean not covered above indicate,
>    ' that control value was not changed - so no action is taken.
> End Sub
>
>
> Arvi Laanemets
>
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> kirjutas s�numis 
> news: eFrJA3$zKHA.4328@TK2MSFTNGP04.phx.gbl...
>> What about
>>
>> Private Sub Combo1_AfterUpdate()
>>  If (Nz(Me.Combo1, 0) = 0 And Me.MySubform.Form.FilterOn = True) _
>>    OR (Me.MySubform.Form.Filter <> "ID1 = " & Me.Combo1) Then
>> ' You need a new filter
>>    Me.Combo2 = 0
>>    Me.Combo3 = 0
>>    If Nz(Me.Combo1, 0) = 0 Then
>>      Me.MySubform.Form.Filter = ""
>>      Me.MySubform.Form.FilterOn = False
>>      Me.MySubform.Form.SubformCombo.RowSource= _
>>        "SELECT ID, SomeText " & _
>>        "FROM MyTable ORDER BY 2;"
>>    Else
>>      Me.MySubform.Form.Filter = "ID1 = " & Me.Combo1
>>      Me.MySubform.Form.FilterOn = True
>>      Me.MySubform.Form.SubformCombo.RowSource = _
>>        "SELECT ID, SomeText FROM MyTable " & _
>>        "WHERE ID1 = " & Me.Combo1 & " ORDER BY 2;"
>>    End If
>>  End If
>> End Sub
>
> 


0
Douglas
3/30/2010 9:37:29 PM
high quality Soccer jerseys NBA Jersey tracksuit and jackets, GHD 
hairstraightener supplier from www.willpa.com

Are you a Retail businessman who bother by the purchase price?  China 
Cheapest TOP wholesale website can help you

we are specialize in replica sport goods manufacturing in china, we can 
offer you all kinds of soccer jersey, NBA jersey,shoes and so on. they are 
the best brand replica goods whih are look the same as the original goods. 
excellent quality and steady supply for them. we have been marketed in Europe 
and American for 3 year. all the goods we offer are AAA quality.  our soccer 
jersey are Thailand style. If any goods you buy from my company have problem, 
we will refund or resend them again. Most of ourProducts have no minimum 
order requirements,soyou can shop retail goods at wholesale prices. if you 
can buy more than 300usd. We offer free shipping. The more you buy the more 
discount for you.

National soccer jerseys: http://www.willpa.com
Club soccer jerseys: http://www.willpa.com
NBA Jerseys: http://www.willpa.com
T-shirt and shirt: http://www.willpa.com
Tracksuit: http://www.willpa.com
Hoody & Jackets: http://www.willpa.com
UGG boots: http://www.willpa.com
Hair style: http://www.willpa.com
shopping Index: http://www.willpa.com

EMS shipping.  7days arrive, paypal accept

want more information pls contact us or check our website: www.willpa.com
0
Utf
3/31/2010 8:22:01 PM
Reply:

Similar Artilces:

"implant" ActiveX ComboBox value into if eq'n
Morning all. Ok, I've got my combox active to where I can read the names in the list. I'd now like to have an if equation that will pull the value I select in the combobox. Do I have to write a secondary macro/function for that, or can I do it directly on the worksheet? Private Sub ComboBox1_Change() Select Case ComboBox1.Text Case "Item1" MsgBox ("Item1") Case "Item2" MsgBox ("Item2") Case "Item3" MsgBox ("Item3") Case "Item4" MsgBox ("It...

unbound forms
I have a form that has a recordsource based on a query I typed in and I have all the controls on the form unbound. I believe with a bound control it keeps a link to the database so there is a lot of communication between form and database right? With an unbound form does the recordsource "download" a recordset that the form then walks through? So if I add a next button to the form, when next is clicked does the form requery the database or does it get the data from the recordset? I am working in access 2007 and right now the database is split with the backend stil...

Bound form with unbound controls
I have a bound form that has 2 unbound combo boxes that I need to have the value of combo #2 as a field value of the table the form is bound to. Haven't worked with ACCESS in a while so my programming is off, but can anyone help me out here? Thanks, Jeff This is an odd request. May I ask why you need an unbound control that has a value from the same table that the form is bound to? Do you mean field name maybe? To get a value (though I don't know why you would in this case), use: =DLookup("Fieldname", "Tablename", "Criteria") If...

Vb.net 2008 Datagridview bound/unbound columns update datasource effecting unbound columns
Greetings, Well this is really a continuation from a previous thread and I've exhausted all my resources in finding an answer so posting in it's own thread. A datagridview is created programmatically and then the datasource is set to a dataset with all but the datagridviewcheckboxcells bound using the dataproperty option. If I change the underlying datasoure I.e. the datatable (e.g. removing a datarow) then the unbound columns if checkbox values are selected i.e. true are ALL set to false. Is this usual behaviour? Can I prevent this? I couldn't find a singl...

Using a Macro to make a combobox selection
From within a VBA macro, I want to select an option from within dropdown list (combobox), so that once the macro has run, the combo bo is reset ready for the next use. The combo box is populated from a static range within the sam worksheet. For example: Choose Name Andrew Brian Charlotte Diana I want the Combo Box to be set by the macro to "Choose Name". I have checked through the info on the forum and some is relevant but cannot get syntax etc quite right. I get error messages that say Objec not defined etc. (Still learning!). I have tried Dim cb As Object, an various other...

Datagridview Combobox Values
Good Afternoon All, I have a datagridview dgv1 that has a combobox column in it. Each row should have an individual item to select from in the combobox. My code displays the same values in all of them. Any help would be great! Here's my code: Dim dsMP As DataSet = New DataSet() Dim intRow As Integer = 0 Dim intRows As Integer = dgvRO.Rows.Count Dim strPartNumber As String = "" Dim dt As DataTable = Nothing Dim dr As DataRow = Nothing For intRow = 0 To intRows - 1 strPartNumber = dgvRO.Rows...

Unbound subfroms or datasheet forms
I'm sorry to bother you guys with probably one of the most obious questions in Access. but here it goes. I already see the advantages of working with forms with unbound recordsets, like adding records, modifying, deleting and so on. What's bugging me is that I dont know how to apply this principle for forms showing multiple records. Is there a way to implement adding records via disconnected recordsets in forms in datasheet view? I'm I making any sense? Thank you guys so much in advance for any help on this -- Rolando On Dec 11, 9:44 am, Rolando <Rola...@discussions.m...

combobox
Good Day, I need help with my combox and textbox. I want my combobox and my textbox to remember what the user had input to them. Unfortunately i don't have a knowledge on how i would code my button to save it. Thanks much, -- Message posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-vb-net/201003/1 shadow-monster wrote: >Good Day, > >I need help with my combox and textbox. I want my combobox and my textbox to >remember what the user had input to them. Unfortunately i don't have a >knowledge on how i would code my bu...

Select subform's query criteria from form's unbound cbo
I want users to be able to select a name from a form's unbound combo box and that selection to automatically become the criteria for the subform's underlying query, without the parameter box for the query popping up. How do I do this? I'm new to VBA and not an Access 2003 whiz either. TIA for your help! WorkerBee wrote: > I want users to be able to select a name from a form's unbound combo > box and that selection to automatically become the criteria for the > subform's underlying query, without the parameter box for the query > popping up. How do I do t...

How can I read an xml file to populate a combobox?
I exported a xml file using .writexml from a dataset and now I would like to populate a combo box from that. Can someone supply a link or sample vb.net code that show's how to do this... much appreciated... here is some of the xml file: <?xml version="1.0" standalone="yes"?> <NewDataSet> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true" msdat...

How to create an unbound Subform related to an unbound Text Box
Hello, Can somebody help me. I wish to make an a bound/unbound Form and bound/unbound subform. This is needed for creating an GRR entry form with the Receipt details on the header and part, qty details in subform along with a button in the bottom to finally raise a auto generated document number to corelate the header table (Order header) to detail table (Order Detail) You have the advantage of seeing your database. For those who cannont, I think more description will be needed of the database's purpose and structure before it is possible to provide a meaningful answer. For ...

Problem dealing with unbound fields
I have a form that is bound to a table. On the same form are unbound fields in a related table (many:1 relationship). I tried using bound fields but no arrangement allows me to add new records to the related table. The problem I have is that most of my processing is kicked-off by the BEFORE UPDATE event, but if the user changes only one of the unbound fields, it does not fire. Where would I put the code to detect changes to the unbound fields so I can update the related table? Or is there any better way to do this? Thanks. I'd say in that case you have to do some checking if you re...

Inserting value of an unbound Textbox
hi, i got a form in which a integer value (Number) is being calculated based on the unput the user is giving in the different fields, now i want to insert this data in a field in my table, when the input is saved any bright ideas? See: Calculated fields at: http://allenbrowne.com/casu-14.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Addy" <Addy@discussions.microsoft.com> wrote in message news:494340EE-F995-4C6...

Refresh a Combobox
I have a cbo which is linked to a named ranged on another sheet. Using code, the named range gets deleted and the recreated, but the cbo does not update it list of items to reflect the new named range content. How can I refresh its list? QB If I close the workbook and reopen it, it refreshes the item list properly?! So why doesn't it adjust when I redefine the named range using vba? QB "QB" wrote: > I have a cbo which is linked to a named ranged on another sheet. > > Using code, the named range gets deleted and the recreated, but the c...

Bound and Unbound
Dear All, Can any one help me in describing the difference between bound and unbound text boxes. with examples if you please. thanx "trabie" <trabie@discussions.microsoft.com> wrote in message news:C978009F-7F70-4FF6-B713-4573B4EC28FF@microsoft.com... > Dear All, > Can any one help me in describing the difference between bound and unbound > text boxes. with examples if you please. There are three states really. Controls that have field names (nothing else) in their ControlSource property. Controls that have expressions in their ControlSource property (somethin...

Unbound Controls
Can I store a field that I calculate in a report in a table. More or less what I want to do is take a stored value on a report and put into a field in one of my tables. Is this possible? On Wed, 12 Dec 2007 13:25:00 -0800, Calvin wrote: > Can I store a field that I calculate in a report in a table. More or less > what I want to do is take a stored value on a report and put into a field in > one of my tables. Is this possible? You have asked a very wide open generic question. Why not take the time to be more specific as to what you wish to do. And why. Did you wish to Update an ...

How do I create a unique unbound DataGridViewColumn?
I need a tutorial on how to create an unbound column for a datagridview. everything is unbound and programmatically populated. is CellValidating the appropriate place to enforce non-duplication? how to enforce it? -- Wannabe Geek "wannabe geek" wrote: > I need a tutorial on how to create an unbound column for a datagridview. > everything is unbound and programmatically populated. > is CellValidating the appropriate place to enforce non-duplication? how to > enforce it? > -- > Wannabe Geek Oh, now I see i will need numerous columns combined in...

Unbound multiuser forms
I have not found much information on the net that discusses unbound forms. I wanted to go the unbound route because I will have many concurrent users. What I want to do is split the MDB in 2. The data will be on an MDB on the server. The front end will be local on the end user's C Drive. To give you an idea at what I am doing, the local front end MDB that is on the C Drive will retrieve a single record. Say, where customer ID equals 123 returning just one record. The user changes the record locally then sends it back to the server MDB. In order to do this I have to manage concurrency i...

display the value of an unbound textbox in a field within a table
I created 3 textboxs to calculate the number of business days between 2 dates. The 3rd textbox contains the value. I now want to have this value displayed in a table field. I'm sure this is easy but I'm a complete novice and have spent far too much time on this already. Can anyone help! Fibi, The general concept of tables is that they are for storage of data in the background. They are not for display of data. That is what forms and reports are for. Therefore, the appearance of the data in the tables is not normally relevant, and the display of calculated values is im...

applyfilter to an unbound subform from a module function
hello, I have a main form called "Main2", within this form there is a unbound subform called"mainsubform" I have a treeview that calls functions in a module to change the sourceobject of the subform to different forms. what i would like to do is call a function that loads a form into the subform and applys a filter to the form. I would like the filter come from the function. Anyhelp would be appreciated. thanks in advance The filter needs to be a string. Example Dim strFilter As String Dim lngPKey As Long strFilter = "[PKey] = " &...

Userform Combobox
I have a Userform with a combobox. The combobox should be a list from which the user could choose an option. My question: "How can I get an optionlist in a Userform?" Just drag it onto the userform from the toolbox. -- HTH RP (remove nothere from the email address if mailing direct) "Jasper" <Jasper@discussions.microsoft.com> wrote in message news:855A71DD-04F0-4BFE-916E-F2CFB23EA017@microsoft.com... > I have a Userform with a combobox. The combobox should be a list from which > the user could choose an option. > > My question: > > "H...

Unbound reports
I'm facing this problem: I want to create a report dynamically from VBA. The data for this report is stored in a Db outside Access 2003. Due to security reasons I don't want to bind the table form the foreign Db to my Access DB. So I'm using a Data Link to create a connection towards the Db. I get all the data in an ADO recordset. From that recordset I want to create a report. I can't set the recordset of my report to the recordset I created, as this is impossible to do in Access 2003. Is the only possiblility to create a temporary query in my Db, build my report, and as I cl...

Unbound text box calculation
Thanks in advance for the assist. My mind went numb... What must I do to have an unbound field only perform the calculation for the current open record that I am working in and not show data in a new records same unbound field when I go to the next record entry? I have an unbound text box on a form - call it Box C. In it's properties control source I have a calculation (i.e. =text box A input / text box B input) that I wish to show within the form prior to moving to the next record. I then wish this field to recalculate or return null (if box A and/or B are empty). Box C ...

auto refresh for combobox
Got no answers over in excel.programming, wondered if any of you guys and gals can help: I don't mind whether I have a Form combobox, VBA combobox of Validate List. However whichever I use, I need to run a macro to rebuild the list of entries for the box, when (or just before) the user clicks the drop down arrow. I have tried a few things myself, but I have not been successful? Can anyone assist? Also, what does the AutoLoad property do on a VBA combobox and where do I find all those properties documented? TIA Paul Lautman ...

Update unbound
This worked yesterday, I opened it this morning and now it doesn't..... Is there a setting wrong? Thanks in Advance Private Sub Trophy_AfterUpdate() If Check35 = True Then Trophy.Locked = True Trophy.Enabled = False Trophy = Full Else Trophy.Locked = False Trophy.Enabled = True Trophy = "" End If End Sub On Fri, 14 Sep 2007 21:39:50 -0700, grubbyr wrote: > This worked yesterday, I opened it this morning and now it > doesn't..... Is there a setting wrong? > > Thanks in Advance > > Private Su...