Search results

  1. D

    Define tempVars from a Table?

    can't you just open a recordset based on your table of variables and assign the names and values from the recordset collection Do While Not(rs.EOF) TempVars.Add rs.Fields("My_Var") , rs.Fields("My_Value") rs.Movenext Loop David PS, I've never used the TempVars function before, just...
  2. D

    Instantiated References in Excel

    Your code doesn't reference a second workbook, and where are you opening this second workbook. When you have 2 workbooks open, you then need to either make one the active workbook or reference each workbook with each command wbk1.Selection.Copy With...
  3. D

    Limit a field to only Alpha Numeric

    you could write a small function which you pass the scanned string and it removes unwanted characters and sends back the remainder. I would have thought there was a vba function that would do this, but I can't find anything. Try this Function cleanStr(incomingStr as String) As String Dim...
  4. D

    Run a Function

    is your function within a module? This type of error is usually caused by trying to run a sub which is in a private environment such as code tied to a form or report. What happens if you move the function into a module, does it still error David
  5. D

    Question Need Help:Basic Inventory System

    I don't understand your Suppliers table, "table 03 Suppliers : (s.no , sup01 ,sup 02 , sup 03)" are you suggesting a table that will hold a different supplier name in each of the fields sup01 ,sup 02 , sup 03 etc If so I would reconsider your table design and consider the relationships between...
  6. D

    Table / import

    I assume you mean you want to update the field [open date] with the dates as entered by your staff. "I than copied the table to excel to get rid of some columns and printed to give to staff to write down the dates for me. (didn't save the spreadsheet)" Oopps, does this mean you only have hand...
  7. D

    Instr From URL

    If you just require the string value that comes after the = sign try this: Dim tokenStr as String tokenStr = Right(ie, Len(ie) - inStr(ie, "=")) where ie is your string varaible that holds the URL David
  8. D

    Warranty by Date

    I think you could just modify what you already have ie: Private Sub Bar_Code_AfterUpdate() Dim warrantyCheck as Date If Not IsNull(DLookup("bar_code", "tbl_Module_Repairs", "bar_code = '" & Me.Bar_Code.Text & "'")) Then warrantyCheck = DMax("[complete_date]", "tbl_Module_Repairs"...
  9. D

    Can't update unbound textbox

    have you tried refreshing the main form when the other form is exited. i.e. on the other form's close event, try Forms!frmMain.Refresh ... edit frmMain to the name of your main form David
  10. D

    highlight the current record in the subform

    try using a modified version your original code to select the record on the sub form, probably just a question of changing the form and control names to suit David
  11. D

    highlight the current record in the subform

    I'm having trouble trying to understand why you'd want to navigate to a different record on your main form by double clicking a record on your sub form. Aren't the records on your sub form linked to the current record on your main form? If this is not the case and your sub form is an...
  12. D

    Simple Database with Primary Key resetting every month

    you still a PK field which can be an autonumber and the File Number field becomes just a reference key which is generated as described in my previous post. I couldn't understand your last comment: "set the file ID criteria to the form's current file ID". i donno what that means, could you please...
  13. D

    Sorting Problem

    have you checked the form's sorting/grouping to see if you have anything set there as this will overide any sorting in your query. David
  14. D

    Simple Database with Primary Key resetting every month

    to be able to automate the filenumber, I'd suggest you need an additional field in your table which will record the filenumber month and I suggest making this the 1st of each month as this could also be useful later for reporting and grouping. This could be a combo box that will list of 1st of...
  15. D

    export data to special excel sheets

    try this: Set xlBook = xlApp.Workbooks.Open("C:\Users\GRIMBEN\Desktop\" & SuWID & "years.xlsm") This assumes SuWID is a number David
  16. D

    Stop export to Excel when no records match criteria

    you could try using DCount on the query and if > 0, export, else message If Dcount("*","200 Select Customers To Import To MYOB") > 0 Then DoCmd.OutputTo .... etc Else: Msgbox "no records found",vbokonly + vbinformation End If David
  17. D

    Can't copy a form

    When the database is locked down, are all the menus/toolbars disabled, if so try restoring them before you try to copy an object. It does sound like you don't have any mouse right-click options which stems from menus/toolbars being in a disabled state. David
  18. D

    Can't copy a form

    Does it behave the same way when you break into it? If you can't copy it, can you export it into some temp database OR if the database is split, just make a copy of the front end as a back up David
  19. D

    VBA: Trying to Close Workbook, nothing happens

    Having multiple instances of Excel running will only cause you problems in a programming sense, so a better approach is to test if Excel is running before you open the source file. Try this recent post http://www.access-programmers.co.uk/forums/showthread.php?t=253655 Try using this method to...
  20. D

    Question 3 way relationship help please

    interesting problem. Can't you get away with using just one table your tblMasterConfig. If the design were such that it could hold all your device details, including device type (PC, Phone, Server etc), any other attribute details plus IP address, PatchPanel & SwitchPort, obviously some of the...
Back
Top Bottom