DK,
Ok I've reinserted the code and now it works as intended with the exception of going to the next record with out hitting the [record] button arrow on the bottom once your at the last MRR that has information.
I think this is pretty good and I'm not sure how much more trouble it is worth...
Dk,
Thanks I'll give that a go. I don't have the MRR# as a primary I have another field as MRRID that is the autonumber primary to avoid any issues... I also forsaw some issues with using MRR# so I created a new index key.
We'll I was messing around I seem to have gotten some things to work...
DK,
Ok I think I found the error it was just in the text I keep forgetting that everything has to be perfect for these to work.
I was missing the _ in this line
It needed to be
So now I can compile and test and it doesn't give any errors...but... there is still one issue.
When I open...
Dk,
Sadly I can't post the DB (wish I could but the company I'm working for would be upset)
I'm going to go back to a back up copy and re-examine what I did...
My initial steps;
In MS VB I hit [insert] then [procedure] and then copied and pasted your coding in after deleting command71...
Dk,
I'm pretty sure that MRR# is a control in the DB as I've seen the Me! in code before.
I've replaced the command # 71 now and implemented the new Private Sub cmdGotoNext_Click
Now when I compile I'm getting a new error
Any idea on how to fix this one?
Cheers
Calvin
Dk,
I have an error in this line of code
It has a compile error coming up saying
"Syntax Error"
EDIT:
DK,
Sorry I should have taken a harder look I fixed that line it just need me to add "Then" before the
text. Now I've fixed that error and I have a new one which is a compile...
DK,
Thanks so much!
I can't wait to get back to work (well in a manner of speaking anways lol) and try this out on Tuesday!
I'll let you know how I make out with the new code :)
Thank you again your a god send!
Cheers
Calvin
DK,
I edited my post above but I think you missed it. I beleive it is all working as I want right now more or less the only thing I would like to change now if possible is when you have multiple records and you don't start at the end is when you hit "assign MRR#" it would take you to the next...
Ok I straightened out those issues by compiling the DB (I remembered that I need to do that sometimes to fix stuff ;) . However I have a new issue )
When I hit the Assign MRR button it will keep moving me to a new record till it ends up at the new record and MRR report (Yay!)
Edit: I have it...
Ok we are getting somewhere I think but it still doesn't quite work as intended.
When I start fresh and have 3 MRR reports fully input and starting on MRR#-001 and record #1 of 3 and I hit the [Assign MRR#] Button it gives me this error
Run-Time Error '2105':
You can't go to the specified...
Under the properties on the "command button" [assign MRR#] I have several "ON" options but I don't see and "OnCurrent"?
There is;
On Enter
On Exit
On Got Focus
On Lost Focus
On Click (which is where i have the event procedure we have outlined above in VB)
On Dbl Click
On mouse down
On mouse...
dk,
You lost me
"OnCurrent() event of the Form"
So this isn't in the Visual Basic Code area but instead I need to input this coding in the event builder in the Form?
Sorry I'm a bit new and learning fast here.
Thanks again
Calvin
dk,
That is what I want to do but I could use some help with the coding I don't know programming to save my life...sorry.
If it is a new MRR# then I want it to go to a new Record # so that for examples sake say I have 10 reports and 10 records I want the user to have to start on record # 11...
dk,
I've tried both as shown below
Private Sub Command71_Click()
Dim MAXMRR As Integer
Dim NumMRR As Integer
DoCmd.GoToRecord , , acNew
NumMRR = DCount("[MRR#]", "MRR")
If NumMRR > 0 Then
MAXMRR = DMax("[MRR#]", "MRR")
Else...
Hopefully someone can assist me with this issue, I'm drawing a blank on how to fix this...
I need to somehow force the front end user to go to the last record before they can assign a new number for a report command event.
Currently the coding is this
Private Sub Command71_Click()...