Solved Last bit of help needed for CRM

NatAccessNewbie

New member
Local time
Today, 22:57
Joined
Jan 25, 2022
Messages
13
Wow this forum has been so helpful! Thank you! I just need help with a couple of last things and then its done :)

The first thing I would like to know how to do is when I open my customer details form how do I set it up so that the relevant customer's name appears in the header. At the moment I just have a simple title that says "Customers Details" lol

Secondly, I want to place a button on my customer details form that will allow me to create a new order for that specific customer who's record I am viewing.

Thank in advance! :)
 
The first thing I would like to know how to do is when I open my customer details form how do I set it up so that the relevant customer's name appears in the header. At the moment I just have a simple title that says "Customers Details" lol
Perhaps you could use the form's OnCurrent event to set the form's Caption property
 
Perhaps you could use the form's OnCurrent event to set the form's Caption property

I'm a complete beginner at this so need more information please. I've located the OnCurrent section on the form property tab and I've opened the code builder which says...

Private Sub Form_Current()

End Sub


I've not a clue what to do next haha 🙈:ROFLMAO:
 
I thought you had already dealt with that in your eariler post

No that was for my a button on my Dashboard form that opened the new order form on a blank record, which I managed to do.

What I'd like to do now is have a button on my Customer Details form that opens the New Order form but linked to that customers record (so it will already have their name and Customer ID in it)
 
I would pass the id in as Openargs
Then in the form current event if new record, set the custid from the openargs.
You can also do a DLookUp() to get the name, or pass that in as well via openargs?

Destination form
Code:
Private Sub Form_Current()
If Me.NewRecord Then
    Me.ClientID = Me.OpenArgs
End If
End Sub

Source form
Code:
DoCmd.OpenForm "frmSubmitterClient", , , "ClientID = " & Me.ClientID, , acDialog, Me.ClientID

I tend not to have a form for new and current records, so I also pass in the ID as a where clause.
If no records for that ID then we have a new record, and so I set the ID from OpenArgs.
If there are records for that ID, then I get to see them?

HTH
 
Last edited:
I would pass the id in as Openargs
Then in the form current event if new record, set the custid from the openargs.
You can also do a DLookUp() to get the name, or pass that in as well via openargs?

Destination form
Code:
Private Sub Form_Current()
If Me.NewRecord Then
    Me.ClientID = Me.OpenArgs
End If
End Sub

Source form
Code:
DoCmd.OpenForm "frmSubmitterClient", , , "ClientID = " & Me.ClientID, , acDialog, Me.ClientID

I tend not to have a form for new and current records, so I also pass in the ID as a where clause.
If no records for that ID then we have a new record, and so I set the ID from OpenArgs.
If there are records for that ID, then I get to see them?

HTH
I'm sorry but I've not a clue what any of that means 🙈 :ROFLMAO: I'm a complete beginner when it comes to coding in access, actually coding in general haha
 
So look at the link I posted.? :(
 

Users who are viewing this thread

Back
Top Bottom