Search results

  1. N

    How to pass/convert a calculated field value to a static field value

    I'd be inclined to keep the old and new rates separate (i.e. two entries for each tax type). If you include a valid from date, you can select the record you want based on the invoice date. I fell foul of this problem some years ago when trying to cope with taxes for each state and territory in...
  2. N

    need start day and end day calculation

    This is SQL for a query. You can paste it in the query editor (when in SQL) view, or you can put it in the data source for a control. I used a dummy table (tDays) as the source for the two dates and created two Date/Time fields for them. If you use your field names and table name, the query...
  3. N

    Combo box issues :s

    What code do you have for the click event on your combo box? It sounds like the problem lies there, but it's impossible to tell without further details.
  4. N

    need start day and end day calculation

    Something like this will do what you needSELECT (dtDateEnd - DateSerial(Year(dtDateStart),1,0)) AS dtAgeDays FROM tDays;This gives the age between start of year and end date. Here, the start of year is determined by the DateSerial function, using the year part of the start date, month 1 and...
  5. N

    Question Automatic fill in field

    If I understand you correctly, your Table 1 is used to identify the generic series name and Table 2 is the record of issues you own for the series title? You want the main table to have the flag set when you have collected all issues for the series? Does Table 2 have a link to Table 1? If so...
  6. N

    Preventing Run-time error 94

    Presumably the error occurs on the linea = Ctl50_1 This is because the Ctl50_1 field has a null value, which can't be assigned to variable 'a'. The solution is to use the Nz built-in functiona = Nz(Ctl50_1, 0) where the 0 is the value passed to variable 'a' when Ctl50_1 is null.
  7. N

    Question how can i make report based on a part of a cell?

    You could use intermediate queries to pick out the common data. Query 1 (named qMT):SELECT *, MID(Field1,4,4) AS MTF FROM [MATRIX TAQ];Query 2 (named qST):SELECT *, MID(Field1,4,4) AS STF FROM [SAP TAQ];Join query:SELECT qMT.Field1, qST.Field1 FROM qMT INNER JOIN qST ON qMT.MTF = qST.STF;
  8. N

    Fill text field from listbox selection

    I have just realised that the code I gave you doesn't work!:eek: My apologies. I was thinking about Combo boxes and applying the same logic to listboxes which is incorrect. I have examined the properties of a bound listbox I have and it does not show the columns anywhere. I also have an...
  9. N

    Simple Macro ? : Input Box or other....

    I'm not clear on the question you are asking? Is it: 1. How to place a button on a worksheet? 2. How to show an input box from the button? 3. How to save the user input to a specified cell? Do you want separate buttons for each row, or do you want to use the same button for the series of...
  10. N

    Fill text field from listbox selection

    That's exactly what the code I gave you does!:) In the Click event of your list box, you simply use the Column indices to get the fields, like this:Private Sub lsbItems_Click() UserName = lsbItems.Column(1) FirstName = lsbItems.Column(2) LastName = lsbItems.Column(3) End Sub Note I have used...
  11. N

    loading a variable depending on what form just closed

    One thing you can do is to put your function 'fIsLoaded' in a module as a Public Function so it remains in scope for every form. Does your wizard sit in its own form or module? If so, you could use a dynamic array to keep track of previous steps.Dim ID As String Dim strForms() As String Rem...
  12. N

    There is an invalid use of the . (dot) or ! operator or invalid parentheses

    The point is to use a non-calculated value for terms in place of each element of a complex algorithm. You can use any value you like here. In essence, you are retaining the calculation structure, but substituting constants in order to reduce the scope of your debugging. You could simply...
  13. N

    Fill text field from listbox selection

    Use the ListBox Columns property to retrieve the individal item column data. The syntax isFirstCol = Listbox.Column(0) SecondCol = Listbox.Column(1)
  14. N

    Customise toolbar/ ribbon button?

    You can use the Ribbon interface by embedding XML into your Excel files, which must be in the new format (i.e. xlsm, xlsx). The easiest way I know of doing this is to use the CustomUI editor, which can be found here...
  15. N

    There is an invalid use of the . (dot) or ! operator or invalid parentheses

    I assume the error occurs on the two lines you have indicated with '-->' prefix? These are heavily nested, so I suggest you do the following: 1. Structure the code so that you have better visibility of the embedded expressions; something like this:Me!txtActualComm = IIf([Total Perform] = 0, 0, _...
  16. N

    Pop Up (I think)

    You don't give much information to help us to solve your problem here.:confused: What do you mean by "country box"? Is this a combo box on a form? If so what is the form bound to - the shipping nformation table? I would not advocate a pop-up box in the context you describe. What is the user to...
  17. N

    Dlookup Defaults

    The bound column of each Combo box is the product Id and the visible column is product name. When you change the combo box value in code (or set its default value), you use the bound column, which is different from what is shown in the drop-down list (although it can be the same thing in some...
  18. N

    Combo box problems

    What is the Row Source for the Combo box (i.e. the value of the string)? How does that relate to the table you showed? What is the bound column of the Combo box?
  19. N

    Query Help

    Did changing the quotation marks help, or did the problem move elsewhere?
  20. N

    Query Help

    appears to have the wrong quotation mark characters. Try"Due Upon Receipt Past Due"instead. Is your syntax fully represented? There is a trailing comma which should have the else part of the IIf statement. It should be something likePaymentStatus: IIf(Date()-[invoice date sent]>=1 And [tbl...
Back
Top Bottom