Search results

  1. D

    Open database with task schedular problem

    how is your .bat file, would expect something like: START C:\Office2000\OFFICE11\MSACCESS.EXE C:\FolderName\fileName.mdb EXIT I'd then have a 2nd scheduled task designed specifically to KILL the Access instance, scheduled to run later when you know the above task would have finished @echo...
  2. D

    Question 3 way relationship help please

    I'd say you have to consider what your aim is in terms of what you're trying to achieve, ie what's your intended output or what functionality is required. You say "but this gets really complicated when deleting joins etc." Why is this necessary. If you have to have a structure where you have...
  3. D

    More Elegant Way to Write Code

    alternatively you could try, I think I've got the correct True/False, but this method allows you accommodate conditions for other users that might want to edit Dim LOGON As String LOGON = DLookup("logonname", "tbllogonname") If (Not IsNull(Me.NEXT_S_DAT)) Then Select Case LOGON Case...
  4. D

    How to get AppTitle??

    to manipulate the application title, I've always used this method: you need to declare this function as you would a global variable ie within a module but outside a function Private Declare Function SetWindowText Lib "USER32" Alias "SetWindowTextA" (ByVal hWnd As Long, ByVal lpString As...
  5. D

    If Then statement doesn't recognise the value in combobox (sending an email)

    have you tried debugging this to see what value is in Me.txtDepartment If you put a break on that line, you can step through it to inspect the value David
  6. D

    Transfer Spreadsheet Won't Work if Excel is Already Open

    You could try checking to see if Excel is running and instead of the: Set xlApp = New Excel.Application try Set xlApp = GetObject(, "Excel.Application") If xlApp Is Nothing Then 'start Excel using CreateObject Set xlApp = CreateObject("Excel.Application") End If and then just open...
  7. D

    Errors with custom filter

    The error is probably due to incorrect syntax around your filter objects, you need to taylor the syntax according to data types for each filter, using your example: Me.Filter = "[Asset Group] = " & Me.cmbFilter1 & "" And "[Location] = '" & Me.cmbFilter4 & "'" This would be suitable when...
  8. D

    automated back up questions

    "Also I think what I could do is program Access to autoclose after the backup has been made." Just add another (final) step line to the autoexec macro to Quit, that will close the application David
  9. D

    Select Customer, Order by Total - Graph Method?

    Is this chart a simple 2 dimensional view of customers vs total sales value? Have you tried using the original query, make it a make table or append query that calculates the totals sales for each customer and puts the values into a temp table and then create another query based on the temp...
  10. D

    How to get last inserted ID in a table

    try this: Dim lastID As Integer strSQL = "INSERT INTO tblSchoolWorkingDays (CALENDAR_DATE) VALUES ('" + format(Me.tBoxDateToAdd) + "')" Docmd.RunSQL(strSQL) lastID = DMax("[ID]","tblSchoolWorkingDays") David
  11. D

    How to get last inserted ID in a table

    Looks to me like there are both errors in syntax and object referencing, also where is the value for LastID coming from, don't understand the "SELECT @@IDENTITY AS LastID" at all, are you trying to select it from another table Your INSERT statement states inserting a value into only one field...
  12. D

    automated back up questions

    How is the database setup, is it split FE/BE, if so it won't matter at all. If the users are sharing a database file, it would still be ok, not sure about a situation where a user had been editing a record and left it in that state. "... also I could copy the table of the REAL database into...
  13. D

    automated back up questions

    you could achieve this by using another simple database which would copy the required database using the FSO method to a dedicated folder. The code could also log the copy in a log file table which can later be queried to determine which backup(s) require deletion. This code should be written in...
  14. D

    Question Listbox deselect

    You could try monitoring the ListIndex property and if the same index is selected more than once, use Me.List383 = Nothing Me.otherControl.SetFocus this will work to deselect the list box The problem now is trying to track the selections David
  15. D

    DCount returns 0 and it's wrong

    unless I'm missing something, your expression: ([Kit] BETWEEN " & Format(sftstart(sftd, sftn), timeformat) & " AND " & Format(sftstart(sftd, sftn), timeformat) & ")") on the asumption that sftstart is returning the same date in both instances, there will only be records returned if they...
  16. D

    strange behaviour of text field

    Is there any event related code that is related to this text box being fired each time the event happens, such as on_Current David
  17. D

    SQL code return value and set to variable.

    Declare your variable as the same data type as that of the field being returned in your recordset. What sort of data type is 'Status'? Dim StatusInt as String/Integer/Boolean The you can assign the value to your variable using: StatusInt = rs.Fields("Status") or StatusInt = rs.Fields(0) if...
  18. D

    Locate a speciic folder in Access

    you'll find the Tools menu in the VB window David
  19. D

    Appointment form

    If you display the PK for the appointment you'd like to edit, you could use the DblClick event of the PK field as criteria to open an editing version of the form DoCmd.OpenForm "frmApptEdit", acNormal, , "[Appt_PK] = " & Me.Appt_ID After you've finished editing, this editing version closes and...
  20. D

    Form bound to ADODB Recordset is read only

    Taking a step back, is the database linked to the table in your SQL database, if so try making a simple form with few test fields and have it bound directly to the table using the forms recordsource property and see if you experience the same inability to edit records. If so then it may be a...
Back
Top Bottom