Search results

  1. T

    POP UP Message - validation test

    In design view on your form, right click on the submit button and choose Build Event, choose "code builder" This should create the default "click" event handler for that button in the VBA editor. (i.e. what happens when the button is clicked) So what now are the conditions that must be met for...
  2. T

    POP UP Message - validation test

    yes, basic example: sub button_click if me.sometextbox.value = "" then msgbox("A value for SomeTextBox must be entered") exit sub end if 'run the query to insert the record
  3. T

    New Parts and Supplier Database

    If that is a representative sample of your data I'd be inclined to leave it in Excel to be perfectly honest. As a learning excercise it's possibly a reasonable place to start, but Excel is really good at this sort of thing and chucking Access at this is a Hammer to crack a nut situation in my...
  4. T

    Increment Time

    Can't argue with that logic :)
  5. T

    File Tracking: Determining if a file should have been received.

    No idea whether you've set your data base up correctly from your description. If you're going to design an entire system around manipulating and interpreting Date/Time data I think it would be worth nailing completely the inbuilt Access Date manipulation Functions like DateAdd(), DatePart()...
  6. T

    Update query sometimes failed

    Knowing what error messages people are getting would be useful in this context. An Update query can fail for all sorts of reasons. You might have locking issues, your users might be making mistakes that the application code doesn't handle, the query might be wrong etc etc etc.
  7. T

    VBA to refresh and publish Excel graphs

    I'd do it pretty much the way you describe cpberg. Do the stuff in Access, have access open up Excel and push the data into it and call the necessary Excel things for excel to do what it needs to.
  8. T

    Increment Time

    txtDateValue = dateadd("n",txtdateValue, 30) Adds 30 minutes txtDateValue = dateadd("n",txtdateValue, -30) Subtracts 30 minutes. So if I can't just enter a time myself, what happens when I have to cover a two week time period incrementing in 30 minute slots?
  9. T

    Compare data between two recordsets - only update fields where different

    Thirded. "I want to compare two sets of Data and update the records where there are differences" Would seem a pretty good description of an Update Query.
  10. T

    Runtime Error '424' Object Required..

    You don't need to touch the function at all, just copy and paste it into a Module and pass the parameters to it from the query as per the example before. SELECT HourTotalProgress(tablename.Grad_year, tablename.Hours_req, NumberofMonths) as TargetHours FROM tablename etc etc etc. Trying to...
  11. T

    Pass text box value to Access Pass Thru Query

    That should work, but without more detail on the nature of the error it's difficult to suggest what the issue might be. Though you do need to have SET NOCOUNT ON, I believe, in your pass through query to prevent errors.
  12. T

    Runtime Error '424' Object Required..

    Function HourTotalProgress(ByRef Grad_year As Integer, ByRef hours_req As Integer) As Double Dim dblPercentComplete As Double Dim IntMonthsFromGraduation As Integer 'Find out how many months away from graducation IntMonthsFromGraduation = DateDiff("m", Now(), CDate("01/05/" &...
  13. T

    Runtime Error '424' Object Required..

    Public Function HourTotalProgress(Grad_year As Integer, hours_req As Integer) As Double Dim intMultiplier As Integer 'check the graduation year against the current year and 'act accordingly Select Case Grad_year - Year(Now()) Case 0 'if the month under 4 the mutliplier is 32...
  14. T

    moving SQL 2000 to SQL 2008

    I might be talking out of my backside here, but I believe a clustered index will effectively give a default sort order. If the clustered index was on the lastname field previously but is now on the Primary Key instead, that might explain it. I wouldn't necessarily recommend messing around with...
  15. T

    SQL SELECT WHERE value is "Binary AND a paticular Binary number"?

    Not done it personally, but there's an article featuring a couple of functions to convert Binary to decimal and vice-versa: http://improve.dk/archive/2011/07/11/converting-between-base-2-10-and-16-in-t-sql.aspx
  16. T

    Referring to a sequentially created variable

    The problem is that without Option Explicit VBA is interpreting your typo as a need for new variables called C0, C1 etc etc You meant to type c(1) = "1" msgbox c(1) But you've typed: c1 = "1" msgbox c(1) hence c(1) is empty because you've put the value in a new variable called C1...
  17. T

    Referring to a sequentially created variable

    it will do c(1) <> C1 You're not using option explicit so VBA is creating those variables on the fly and your data is now in a variant type Variable called C0 rather than in element 0 of the array c(). Add "OPTION EXPLICIT" under Option Compare Database in your modules and run it again, see...
  18. T

    Splitting a database for updating.

    Not quite. traditionally the Back End contains only the Tables, the front end holds the code and queries, but you're otherwise on the right lines. 10 reasons to split from Tech Republic
  19. T

    Referring to a sequentially created variable

    dim c(12) actually gives you a 13 element array from 0 to 12 so the subtraction of the number of your control might not be necessary
  20. T

    Referring to a sequentially created variable

    dim C(12) as string msgbox = C(Right(controlname, Len(controlname) - 1)) You could stick the number in an integer variable first if you want to. dim i as integer dim C(12) as string i = Right(ControlName, Len(ControlName) - 1) msgbox c(i)
Back
Top Bottom