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...
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...
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...
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...
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] =...
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", _...
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...
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...
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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.