Search results

  1. N

    Log In Read-Only

    Yes, use allowedits and set to true or false depending on what they are. Me.AllowEdits = false I normally have a global variable, say blnAdminRights, then use me.allowedits = blnAdminRights so if the blnAdminRights are TRUE, i.e. an Admin user, the allowedits will be true also...
  2. N

    Average of unbound cells?

    dim intCount as integer dim h as integer dim lngtotal as long dim lngAverage as long intCount=0 for h= 1 to 4 if me.controls("Diff" & h).value<>0 then lngtotal=lngtotal+me.controls("Diff" & h).value intcount=intcount+1 end if next h lngAverage = lngtotal/intCount
  3. N

    Counting missing date intervals

    Change it to a function, like below Function count_stock_zeros() As Integer Dim rst As New ADODB.Recordset Dim strSQL As String Dim con As ADODB.Connection Dim dtStock0Start, dtStock0End As Date Dim blnStock0Recording As Boolean Dim intStockGaps As Integer Set con =...
  4. N

    Combo box with a different row Source

    Not a problem, you can move the bound column around, so have it at the end or something, just remember where it is and to set it, and you should have no issues.
  5. N

    Combo box with a different row Source

    Use a multicolumn combo, with the ID in the first column, but the column width set to zero, make sure the bound column is 1 so you would have Select staffID, [FirstName] & " " & [Last Name] or something like that as the source, column count of the combo as 2 column widths as 0;10 where...
  6. N

    Counting missing date intervals

    If i have understood right, this should do it. Uses ADO <CODE> Sub nathans_test() Dim rst As New ADODB.Recordset Dim strSQL As String Dim con As ADODB.Connection Dim dtStock0Start, dtStock0End As Date Dim blnStock0Recording As Boolean Set con = Application.CurrentProject.Connection...
  7. N

    DLast not showing correct values

    Cant really advise without seeing, can you attach a zipped DB?
  8. N

    Start of year

    dateserial(year(date),1,1)
  9. N

    Counting missing date intervals

    Get the information into a recordset, then either loop through and count the 0's or a sql statement to count all 0's between these dates. Is this what you wanted "4 instances of no stock" or do you want "no stock for 1 day from 10/6 and 3 days from 13/6"
  10. N

    Image Combo

    Hi, I have tried the tag option and that works fine, thanks a lot for that. however, i cant get the change event to work, it works when i first load the form and populate the box, but then when i select something, it doesnt start my code. Private Sub imgCbo1_Change() MsgBox...
  11. N

    Image Combo

    Hi, I did want it to behave the same as a multi-column combo in Access, where the ID would have been column width of 0. I will try the tag method. Thanks Nathan,
  12. N

    Image Combo

    Microsoft Image Combo Box Control 6.0 SP4 MSComctlLib.ImageComboCtl.2 ImageComboCtl I am using access 2007 and 2003. Thanks.
  13. N

    Image Combo

    Hi, No it was an activex control.
  14. N

    Image Combo

    Hi, I have an image combo on my form that is working fine, however, i want the selection to have the primary key of the selection in column (0) but not to be visible, and (1) to have the company name. Can anyone advise, i have tried my conventional method, but it wont allow i am adding as...
Back
Top Bottom