Weird Form problem?

Gasman

Enthusiastic Amateur
Local time
Today, 08:57
Joined
Sep 21, 2011
Messages
16,698
Hi all,

I have a simple split form that merely shows the data in a table.
All the fields have conditional formatting on them to disable the textbox controls if the last text control on the form is populated.

I also have a standard Close Form button, made with the wizard that uses a single line macro to close the form.

Strangely the button does not work when I am on a record with all the text controls disabled due to the test condition.?

I deleted the button and recreated it and it still behaves in the same way.
I have no code in the form's events, as it is a basic form for the table.

I have since discovered, that if I change the form to a single form the button works?:banghead:
I tried changing the button click event to code with DoCmd.Close and still behaves the same way?

Has anyone ever experienced this?
 
Last edited:
If the macros are disabled , due to security, or disabled,
Then they won't run.

VB must be enabled.
 
If the macros are disabled , due to security, or disabled,
Then they won't run.

VB must be enabled.

Ranman,

The macros run fine in the context I have mentioned. Just puzzled at this behaviour?
 
Could you post a sample database?
 
Could you post a sample database?

Good morning JHB,

DB attached.

When form is opened, the first (and many more after that) have a value in the the IntroducerPaiddate field. On records like these the close button does not work.
Scroll down to a record that is empty for that field and the button works. :)

My intention is that when that field is set, the record is not editable.

Thank you
 

Attachments

if I select any record or the record selector on the top form the close button works.
it only appears to not work when nothing has focus ?
 
See the attached picture.
 

Attachments

  • SelectRecord.jpg
    SelectRecord.jpg
    68.6 KB · Views: 55
Thank you both,

I was just opening the form and then trying to close it.:banghead:
From your observations, I have now set focus to the button on form load as when initially opened those records will always be disabled.

I *thought* that as that was the only control on the form that was enabled, that it would automatically have the focus?
 

Users who are viewing this thread

Back
Top Bottom