Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. th3spankst3r

    Query by Form help

    Hey everyone. Sorry I'm asking so many questions, but hopefully this one will be an easier fix. I'm trying to do a Query By Form (QBF) according to the QBF instructions found here: http://support.microsoft.com/kb/209645/ When I applied my personal object names to this technique, it worked at...
  2. th3spankst3r

    Generate next letter when certain event is true in MS Access

    The problem that I'm having with this code is that it cannot be ran independently because it depends on values entered by the user on a form. The code looks good to me, however, when I start inputting data into the form and then run the function, it gives me errors. This makes it difficult for...
  3. th3spankst3r

    Generate next letter when certain event is true in MS Access

    I agree, and no disrespect taken. It's been years since I have written ANY code at all, and have never worked with VB in any sense. I'm doing this mainly as a learning tool, to remind myself what programming is all about. However, I would have failed myself if I spent the next time learning and...
  4. th3spankst3r

    Generate next letter when certain event is true in MS Access

    Can I do that without needing to mess with my current data? I'm not sure I know how to do all of that. There may be other problems as well. I don't plan on this database being editable by everyone. I'm the only one around here that knows any kind of programming or anything about databases, for...
  5. th3spankst3r

    Generate next letter when certain event is true in MS Access

    Alright I think I fixed that problem. Because "Entry Number" is referring to a field's value on my table, it must be in brackets. now I get the error: Invalid use of Null in your code at line FirstClosedEntryNumber = DMin("[Entry Number]", "In Maintenance", _ "[Sub Shop] =...
  6. th3spankst3r

    Generate next letter when certain event is true in MS Access

    I ran the database with your code and tried to execute the function and it gave me the same error... Run-time error '3075': Syntax error (missing operator) in query expression 'Max(EntryNumber)'. in the line... LastEntryNumber = DMax("Entry Number", "In Maintenance", _...
  7. th3spankst3r

    Generate next letter when certain event is true in MS Access

    a couple of questions about your solution. For this section... 'Return the Entry Number of the last record in the Sub Shop selected as LastEntryNumber. 'This statement will do the same thing as your nested IFs below. 'Sub Shop is a field name containing a space so it must be in...
  8. th3spankst3r

    Generate next letter when certain event is true in MS Access

    Public Function CalculateNextERONo() Dim LastEntryNumber As String Dim FirstClosedEntryNumber As String Dim NextClosedSuffix As String Dim OldPrefix As String Dim OldSuffix As String Dim NewPrefix As String Dim NewSuffix As String Dim NextERONo As String...
  9. th3spankst3r

    Generate next letter when certain event is true in MS Access

    Hmm by the time I read your post, I had figured out a way to do it using bits and pieces of others' suggestions, however, what I wrote does not work for some reason. I'm sure it is a simple fix though, because it is all simple code, however there's a ton of it. Since this is already written, if...
  10. th3spankst3r

    Generate next letter when certain event is true in MS Access

    Alright what if I keep all of the records and add a new boolean field "Open" or "Closed"? Add an autonumber primary key (which I already added just in case), and when it needs to loop back, have it look for the first ERO number in the "Closed" status, and then create a new record with the same...
  11. th3spankst3r

    Generate next letter when certain event is true in MS Access

    Well, let me clarify. I work in a maintenance shop for the US Marines. We induct gear from other platoons to repair the gear. Upon induction, we write up an ERO. The ERO number is the next in the sequence for that platoon's "sub shop". Each platoon is assigned a sub shop, including a sub shop...
  12. th3spankst3r

    Generate next letter when certain event is true in MS Access

    Sorry for not being descriptive enough. The change from HDD to HDA was a mistake in writing the question. This code, when finished, will be used for several sets of EROs ranging from HDA to HDZ. Most instances will just include HD(D)00 to HD(D)x99, but certain situations will require HD(A)00 to...
  13. th3spankst3r

    Generate next letter when certain event is true in MS Access

    I am writing a database, which I am very new to, and have come across a problem. Maybe someone can find a way around the problem or solve the problem directly. The table that I'm working on will manage equipment repair orders (EROs). EROs are assigned a 3 letter prefix and a 2 number suffix...

Part and Inventory Search

Back
Top