User Profile

Collapse

Profile Sidebar

Collapse
MarcinM
MarcinM
Last Activity: Jul 16 '15, 10:46 AM
Joined: Nov 21 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • MarcinM
    started a topic Clearing combo box using VBA generates error

    Clearing combo box using VBA generates error

    Hello,

    I would like to clear comboBox2 once a new value is chosen in comboBox1 (comboBox2 values depend on comboBox1).

    I tried the following VBA in after update event:

    Code:
    Me.comboboxName = ""
    Me.comboboxName = Null
    but it generates an error saying that a Null value was attempted to be assigned to a variable different from Variant (run-time error '3162').

    I would...
    See more | Go to post

  • Empty dropdown list when “Null” value appears in the table

    Hello,

    There are the following tables (one-many relationship):

    tblMeasuredSign als
    ID_MeasSignal (PK)
    (…other fields…)
    intSignalID

    tblSignalIDs
    intSignalID (PK)

    User assigns a number to a measured signal from a dropdown list (i.e. a cable connection must be made to measure a signal therefore each wire must have a unique ID). The idea is to hide these values...
    See more | Go to post

  • Replacing default error message (duplicate index 3022) with a custom one

    I assigned index on two table fields:
    [orderID]
    [CurrencyName]

    The following code is to trap a duplicate index and replace default error message with a custom one.
    PROBLEM: Although my custom error message appears, the default one also shows up.

    Private Sub Form_Error(Data Err As Integer, Response As Integer)
    Code:
    Select Case 
    'code here
     Case DataErr = 3022 ‘ duplicate index
    ...
    See more | Go to post

  • Delete record - error You entered an expression that has an invalid reference...

    Hello,

    Once I delete a record on a form (form has a subform) using a button available on a ribbon the following error window is displayed:
    „You entered an expression that has an invalid reference to the property Form/Report“ – the error is display in a window with OK button only.
    It is displayed after either OK or Cancel button is pressed, when delete confirmation dialog box appears.

    I have...
    See more | Go to post
    Last edited by MarcinM; Jan 8 '15, 09:04 AM. Reason: Found line causing the error

  • Steward,
    Thank you.
    Indeed the code given in the linked post works for conditional formatting in datasheet view.

    Code:
    Private Sub Form_Open(Cancel As Integer)
    
        Dim lngCustomColor As Long
    
        lngCustomColor = -2147483633
    
        Me.txtMyTextBoxControl.FormatConditions(1).BackColor = lngCustomColor
    
    End Sub
    ...
    See more | Go to post

    Leave a comment:


  • MarcinM
    started a topic User defined colour for conditional formatting

    User defined colour for conditional formatting

    Hello,

    I would like to highlight the active cell in a subform (datasheet). It is possible to use conditional formatting to achieve that, but I would like to use a different colour than the ones available in the pallet. I haven't seen any button to add user defined colour.

    Question:
    How can it be done?

    There is also a datasheet.backc olor property, but it changes colour of entire datasheet form -...
    See more | Go to post

  • Thank you for your reply.

    Ribbon's XML seems to be correct and the form's "RibbonName " property is also defined.

    The ribbon appears once the form is open but only when "Allow full menus" is enabled. When it is disabled the ribbon also shows up but the tab is empty.

    I attached an image showing the problem.
    [IMGNOTHUMB]http://bytes.com/attachments/attachment/8118d1420108597/customri...
    See more | Go to post
    Last edited by NeoPa; Jan 4 '15, 03:45 AM. Reason: Made pic viewable.

    Leave a comment:


  • Buttons in customized ribbon disappear when "allow full menus" is disabled

    Hello,
    I customized ribbon for a pivot chart form using the below given code - it displays the only required buttons.
    However, when I disable "allow full menus" only empty tab is displayed.
    How can it be fixed?
    Thank you for any suggestions.

    Code:
    <!-- Piovot chart ribbon -->
    		<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    	  <ribbon startFromScratch="true">
    ...
    See more | Go to post

  • Determine which field in table triggered error 3314 or 3317 (required property=yes)

    Hello,
    I would like to have data validation at table level.

    Let's assume that field's property "Required" is set to "yes" (error 3314) or data validation rule is "Is Not Null" (error 3317) and a table has multiple field, which cannot be null:
    txtField_1
    txtField_2
    ...
    txtField_n

    How can I determine which field triggered error 3314/3317 so that it is possible...
    See more | Go to post

  • Yes, using a calculated field in a query is an interesting approach. However, my form is based on 3 tables (1 table on 1-side one, 2 tables on many-side) and when I add all the required fields the all the tables the query (and form) becomes read only. Is there a work around to make it editable?...
    See more | Go to post

    Leave a comment:


  • Calculated field updated correctly with VBA after 2nd attempt

    Hello,

    I have the following calculated field:
    =[quantity]*[pricePerPiece]*[currency].[column](1)

    “Currency” is a comobox based on the following query:
    SELECT DISTINCT tblCurrencyName s.CurrencyName, tblExchageRates .ExchangeRate
    FROM tblCurrencyName s LEFT JOIN tblExchageRates ON tblCurrencyName s.CurrencyName = tblExchageRates .CurrencyName
    WHERE (((tblExchageRa tes.OrderID)=[form]![OrderID]));...
    See more | Go to post

  • MarcinM
    started a topic Sum calculated field on a form

    Sum calculated field on a form

    Hello,

    I have a calculated field on a subform, which works as required:

    Code:
    =IIf([currency].[column](0)='EUR';[quantity]*[price1pc]*1;[quantity]*[price1pc]*[currency].[column](1))
    In case the chosen currency name is 'EUR',exchageRa te is not applied (i.e. = 1). The values taken to the calculation are drawn from a field 'currency', which is based on a query.

    I have already learnt that running...
    See more | Go to post

  • Thank you for your posts.

    The following solution seems to be working
    I assigned "currencyNa me" to a query and refer to necessary columns using VBA (columnt(x))

    Code:
    Private Sub PoleKombi_AfterUpdate() 
     me.exchangeRateID = Me.comboBox.Column(1) 
     me.currencyName=  Me.comboBox.Column(2) 
     me.exchangeRate = me.comboBox.Column(3) 
     me.value = Quantity*Price *exchangeRate)
    end
    ...
    See more | Go to post
    Last edited by Rabbit; Nov 30 '14, 05:49 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

    Leave a comment:


  • Thank you for your answers.
    A few words of explanation

    << Why is OrderID in the tblExchangeRate s?
    << One could assume that the exchange rate does not vary
    << by order but by currency being used by the customer.
    There may be MANY currency names in ONE order, that is why OrderID is in tblExchangeRate (side many of the relation).

    << I also am unclear as to how all three...
    See more | Go to post

    Leave a comment:


  • Pass a value to calculated field from different table

    Hello,
    There are 3 tables with fields as shown below. All the tables are on the same form.
    Side One: tblOrders
    Side Many: tblOrderDetails , tblExchangeRate s

    I would like to make a calculated field “Value” in tblOrderDetails .
    How can I pass to this calculated field the value of exchange rate field from tblExchangeRate s?

    Thank you for any hints.

    tblOrders (one side)
    ...
    See more | Go to post
No activity results to display
Show More
Working...