Unlocking forms in Northwind Sample

YNWA

Registered User.
Local time
Today, 04:17
Joined
Jun 2, 2009
Messages
905
Hi,

Does anyone out there know how to unlock the forms within the Northwind database sample to allow people to edit Invoices once they have been invoiced?

I need ability to edit them after invoiced because the customer may receive discount at later date or new price negotiated, so I need the ability to edit invoices.

Tried a few macros and vba but nothing seems to be able to take the lock off completely?

Anyone?

Cheers
 
I don't have access to the Northwinds DB right now but,

Open form in design view.
Make sure AllowEdits = Yes
or
If you want to trigger it in VBA
You might want to add a command button and in the OnClick event of the button add:

Me.AllowEdits = True
 
I don't have access to the Northwinds DB right now but,

Open form in design view.
Make sure AllowEdits = Yes
or
If you want to trigger it in VBA
You might want to add a command button and in the OnClick event of the button add:

Me.AllowEdits = True

Tried that already mate. Still wont work.

It has been stumped good and proper.
 
From what I can see they use a combination of things.
In the OnCurrent event (VBA) they might use AllowEdits = False
Or
They might lock the detail section.

You will have to go through the Visual Basic of the forms to see what method they may be using.

It would help to know the name of the form that you are trying to unlock.
 
From what I can see they use a combination of things.
In the OnCurrent event (VBA) they might use AllowEdits = False
Or
They might lock the detail section.

You will have to go through the Visual Basic of the forms to see what method they may be using.

It would help to know the name of the form that you are trying to unlock.

Name of the form is OrderDetails. There is no VBA on the forms or subforms. Its all Macros.

There is a SetFormState used in Marcos that looks like it locks the form once IsInvoiced is checked.

But I aint got a clue with macros and/or this lock/unlock set up.

Any ideas on closer inspection?

Cheers
 
I saw those macros, and they are confusing.

On a copy of the DB, you could try converting the macros to VBA and then see if you can then understand what it is doing?

As far as SetFormState, go to the VBA editor for the Order details form,
Do a search for "SetFormState" which will lead you to the Sub(routine) that is controlling what is enabled or locked.

I've never tried to use the Northwind DB myself, but if anyone sees this has, maybe they can explain how flows through the different form states.
 

Users who are viewing this thread

Back
Top Bottom