msaccess-vcs-addin icon indicating copy to clipboard operation
msaccess-vcs-addin copied to clipboard

CommandButton.PictureCaptionArrangement missing from export

Open HughWarrington opened this issue 11 months ago • 6 comments
trafficstars

I think the title says it all really.

I have a CommandButton with PictureCaptionArrangement set to Right.

image

On export, this property is missing from the form's .bas file. Then when I rebuild, the CommandButton doesn't get that property set and has just the default.

As a stab in the dark I tried adding the line manually to the .bas file:

image

But the import fails with an error here:

image

Microsoft Access encountered an error while importing the object 'Subjects'.

Error encountered at line 565.
This property does not apply to this control.

HughWarrington avatar Nov 23 '24 21:11 HughWarrington

This is similar to #170, which turned out to be an Access version issue. I'm not sure if it's identical, but it looks quite similar.

hecon5 avatar Nov 25 '24 20:11 hecon5

Just for reference, I can do a full round-trip export/build with different caption alignments...

image

You might try creating a test database to see if you can pinpoint the issue... You could also copy and paste the button to see if it will generate the missing properties... I have seen a few cases where certain properties were missing from controls that were created in earlier versions of Access. (That's what inspired the "Repair Colors" tool in Advanced Tools.)

joyfullservice avatar Nov 25 '24 20:11 joyfullservice

@joyfullservice thanks for looking into this. Can I clarify, in your test after you ran an export, did your source file contain the PictureCaptionArrangement line?

HughWarrington avatar Nov 29 '24 16:11 HughWarrington

Yes, it does.

image

Attached is the complete file. (Added a .txt extension to attach it directly, since .bas is not supported by GitHub.) If you want, you could try importing this into a project. (Just drop the file into the source folder, remove the extra extension, and build from source.)

Form1.bas.txt

joyfullservice avatar Nov 29 '24 16:11 joyfullservice

Is this still broken for you or did you find more information out @HughWarrington ?

hecon5 avatar Dec 19 '24 16:12 hecon5

Thanks for the feedback guys. I've been waylaid with other aspects of the project I'm working on but will get back to the coding side early next year. This ticket will be on my list to investigate. Happy holidays :)

HughWarrington avatar Dec 19 '24 18:12 HughWarrington