Search results

  1. R

    Problem using Expr1 in an Unmatched Query

    To create a field to join to you could add a calculated column to your Employees table that stores the Full Name then create the join on that value.
  2. R

    Next Record and EOF

    It would depend on how your users log on, If the Username / UserLevel are stored as variable or actually visible on the form then you could use the OnCurrent event for the form: If UserLevel = "Admin" Then Cmd_Add.Visible = True Cmd_Delete.Visible = True Else...
  3. R

    Problem using Expr1 in an Unmatched Query

    Try this; SELECT NewClients.FullName, tbl_Employees.LastName, tbl_Employees.FirstNames FROM NewClients, tbl_Employees WHERE ((Not (NewClients.FullName)=[tbl_Employees].[FirstNames] & " " & [tbl_Employees].[LastName]));
  4. R

    How to call Function

    It appears that this is an Excel Macro to send records to an Access Database and would be run from the Excel Sheet. The sheet has the Database Path in cell B1 and the Table name in Cell B2 Then 2 named ranges; 'tblHeadings' Which would be the column names 'tblRecords' Which would be the...
  5. R

    For...Next statement and convert strint to currency

    Just another thought. To avoid repeating code, you could use a function which will reduce the amount of coding. Private Sub CombYear_AfterUpdate() For i = 1 To 12 strFundCode = "GEN" Me.Controls(strFundCode & i & "") = GetTotal(strFundCode, Me.CombYear, i)...
  6. R

    For...Next statement and convert strint to currency

    Possible solution would be to catch a null value and then make it 0; rst.Open sql, conn if isnull(rst.GetString) then Gtotal=0 Else Gtotal = Format(rst.GetString, "Currency") End If Form_Summary.Controls("GEN" & i & "") = Gtotal rst.Close
  7. R

    I need a little db help please

    More like this?
  8. R

    Field widths based on control

    Have you tried using a progress bar control on the form instead?
  9. R

    I need a little db help please

    Hi, Is this roughly what you wanted?
  10. R

    Removing multiple items from multiselect listbox

    WHERE [Print ID] = 1 OR [Print_ID] = 2 ....... Is that what you mean? That could be an option, What is the maximum length of a string variable?
  11. R

    Removing multiple items from multiselect listbox

    There isn't one. Generally there wouldn't be more than 1000 at a time.
  12. R

    Removing multiple items from multiselect listbox

    The listbox shows all items that have not been printed so could be any number of items. And the user can select as many items as they wish.
  13. R

    Removing multiple items from multiselect listbox

    That works perfectly: For Each i In Me.lst_Print.ItemsSelected sql = "DELETE '*' FROM [tbl_print] WHERE [Print_ID] = " & Me.lst_Print.ItemData(i) & " ;" CurrentDb.Execute (sql) Next Me.lst_Print.Requery
  14. R

    Removing multiple items from multiselect listbox

    Excellent, that's what I was looking for! Thanks vbaInet :)
  15. R

    Removing multiple items from multiselect listbox

    Sorry, should be more specific; lst_print is a multiselect listbox on my form. I'm using a drag and drop function that I 'borrowed' from a forum, can't remember where now. When I drag from the listbox it should delete the items from the print table. The function cycles through the listbox...
  16. R

    Removing multiple items from multiselect listbox

    Sorry, should be more specific; lst_print is a multiselect listbox on my form. I'm using a drag and drop function that I 'borrowed' from a forum, can't remember where now. When I drag from the listbox it should delete the items from the print table. The function cycles through the listbox...
  17. R

    Custom Message Box

    I recently posted an example for a custom message box. Then realised that it wasn't overly portable. Back to the drawing board and now have this one! Give it a go and let me know what you think. Any suggetsions greatly appreciated. Paste the code into an empty Module. Option Compare Database...
  18. R

    For...Next statement and convert strint to currency

    Try this: Private Sub CombYear_AfterUpdate() Dim conn As ADODB.Connection Dim rst As New ADODB.Recordset Dim sql As String Dim Mtotal, Btotal, Gtotal As Currency Dim yy As Integer yy = Me.CombYear For i = 1 To 12 Set conn = CurrentProject.Connection...
  19. R

    IIF statement

    Hi, Is '8' the only option, or does [code] have multiple options?
  20. R

    Removing multiple items from multiselect listbox

    Hope someone can help. I have a listbox on a form with letters waiting to be printed. I need to be able to remove multiple items at once using an SQL statement. The main problem is that I need to include multiple columns in the SQL as I loop through the items. What I need is something like...
Back
Top Bottom