Smart Domain Functions Builder

Moosak

Member
Local time
Today, 00:08
Joined
Jan 26, 2022
Messages
32
Hello every buddy..

This is my first post in here.
My name is Moosa Al-Kalbani and I am an Access database designer.

Today I am pleased to present to you this unique and wonderful gift 😊

(Smart Domain Functions Builder)
Dloockup, DCount, DMax, DMin, Dfirst, DLast , DSum, DAvg

صورة البرنامج.png


This legend is a tool that I designed in Access (thanks to God) that writes domain functions on your behalf automatically.. and gives you the result directly 👌🏼😉

No one will go wrong in writing Syntex for these functions anymore 😁

All you have to do is import this tool into your database, then choose the desired table or query and the desired field, and then enjoy 🙂

✨ Its advantages: ✨
1 - It is easy for you to write the names of tables and fields (just choose them from the drop-down list).
2- You can make a function with four 4 criteria with ease.
3- It checks the result directly for you to make sure that you will get the data you want.
4 - Easy to use, just follow the steps shown and make sure you choose the right data type.
5 - You can use the equations or variables in the function as sources of criteria.
6 - You can make your own modifications to the function directly and check the result immediately after modifying the final result.
7 - The ability to obtain the formula for the VBA code editor, the formula used in queries, or the expression builder.
8- The ability to use the tool independently without the need to transfer it to your database.
9- As you can notice The interface is designed with two languages Arabic/English in order to be used by more segment of people.
10- And many more that you will have to discover on your own

How to use :
Easy and simple. Just drag the form named "SmartDomainFunctionsBuilder_F" to your database by drag and drop..
Then open the form, and it will automatically identify the tables and queries for your database directly 🙂
Drug And Drop copy.jpg

(With the possibility to use the tool independently without the need to transfer it to your program, but you will lose the advantage of getting the result directly 😉)

A lot of experiments have been done on the tool and many errors have been avoided and fixed, but I still do not dispense with your opinions and feedback through your use of it 😉

For more details (please watch the video): 🙂

Finally download the tool from the attachments 😊
 

Attachments

That's awesome. Very easy to understand.
 
Nice one Moosa!
Perhaps you can also explain how you made that video, the tools you use and how much time it took to complete.
I don't think this was your first time.
Thanks!
 
Hello every buddy..

This is my first post in here.
My name is Moosa Al-Kalbani and I am an Access database designer.

Today I am pleased to present to you this unique and wonderful gift 😊

(Smart Domain Functions Builder)
Dloockup, DCount, DMax, DMin, Dfirst, DLast , DSum, DAvg

View attachment 100167

This legend is a tool that I designed in Access (thanks to God) that writes domain functions on your behalf automatically.. and gives you the result directly 👌🏼😉

No one will go wrong in writing Syntex for these functions anymore 😁

All you have to do is import this tool into your database, then choose the desired table or query and the desired field, and then enjoy 🙂

✨ Its advantages: ✨
1 - It is easy for you to write the names of tables and fields (just choose them from the drop-down list).
2- You can make a function with four 4 criteria with ease.
3- It checks the result directly for you to make sure that you will get the data you want.
4 - Easy to use, just follow the steps shown and make sure you choose the right data type.
5 - You can use the equations or variables in the function as sources of criteria.
6 - You can make your own modifications to the function directly and check the result immediately after modifying the final result.
7 - The ability to obtain the formula for the VBA code editor, the formula used in queries, or the expression builder.
8- The ability to use the tool independently without the need to transfer it to your database.
9- As you can notice The interface is designed with two languages Arabic/English in order to be used by more segment of people.
10- And many more that you will have to discover on your own

How to use :
Easy and simple. Just drag the form named "SmartDomainFunctionsBuilder_F" to your database by drag and drop..
Then open the form, and it will automatically identify the tables and queries for your database directly 🙂
View attachment 100168
(With the possibility to use the tool independently without the need to transfer it to your program, but you will lose the advantage of getting the result directly 😉)

A lot of experiments have been done on the tool and many errors have been avoided and fixed, but I still do not dispense with your opinions and feedback through your use of it 😉

For more details (please watch the video): 🙂

Finally download the tool from the attachments 😊
This has saved me a lot of headaches, thanks a lot, makes the understanding on how this D functions work, so much easy.
 
Hello every buddy..

This is my first post in here.
My name is Moosa Al-Kalbani and I am an Access database designer.

Today I am pleased to present to you this unique and wonderful gift 😊

(Smart Domain Functions Builder)
Dloockup, DCount, DMax, DMin, Dfirst, DLast , DSum, DAvg

View attachment 100167

This legend is a tool that I designed in Access (thanks to God) that writes domain functions on your behalf automatically.. and gives you the result directly 👌🏼😉

No one will go wrong in writing Syntex for these functions anymore 😁

All you have to do is import this tool into your database, then choose the desired table or query and the desired field, and then enjoy 🙂

✨ Its advantages: ✨
1 - It is easy for you to write the names of tables and fields (just choose them from the drop-down list).
2- You can make a function with four 4 criteria with ease.
3- It checks the result directly for you to make sure that you will get the data you want.
4 - Easy to use, just follow the steps shown and make sure you choose the right data type.
5 - You can use the equations or variables in the function as sources of criteria.
6 - You can make your own modifications to the function directly and check the result immediately after modifying the final result.
7 - The ability to obtain the formula for the VBA code editor, the formula used in queries, or the expression builder.
8- The ability to use the tool independently without the need to transfer it to your database.
9- As you can notice The interface is designed with two languages Arabic/English in order to be used by more segment of people.
10- And many more that you will have to discover on your own

How to use :
Easy and simple. Just drag the form named "SmartDomainFunctionsBuilder_F" to your database by drag and drop..
Then open the form, and it will automatically identify the tables and queries for your database directly 🙂
View attachment 100168
(With the possibility to use the tool independently without the need to transfer it to your program, but you will lose the advantage of getting the result directly 😉)

A lot of experiments have been done on the tool and many errors have been avoided and fixed, but I still do not dispense with your opinions and feedback through your use of it 😉

For more details (please watch the video): 🙂

Finally download the tool from the attachments 😊
Sorry I want to find out if anyone else has the same error I got running in Access 365 64 bit?
 

Attachments

  • SDFB error.png
    SDFB error.png
    15.8 KB · Views: 20
Yes - I get the same error in 64-bit Access

I've had a very quick look at the code and there are no APIs needing to be converted.
There is nothing obvious in the Form_Open event that is triggering the error

EDIT:
Just figured out the problem
The Detail section name is in (I assume) Egyptian - a non-Latin character set
Go to Design view, click on the section and rename it to Detail. Save and reopen. Fixed!

However, there is a similar issue when you click the domain combo due to a table with an Egyptian name in the combo value list
I removed that but still get errors.
Hopefully the OP can return and provide a version which works correctly in 64-bit Access
 
Last edited:
the startup form has an arabic control name (the detail section of the form).
so you need to rename it to english.

you create new db and copy all objects from the original db.
 

Attachments

Apologies for the delay in updates.

The tool has been updated with new features, including:
- Ability to add an unlimited number of criteria.
- Option to extract criteria values directly from reports.
- Simplified process to add parentheses around criteria.
- Automatic saving of the last result.
- Support for adding the NZ function to the result.
- Enhanced options for date-type criteria to ensure accurate results and resolve format inconsistencies.

Please download the demo and check if it works properly in your country (non-Arabic versions).

1759569201388.png
 

Attachments

Hi @Moosak
I've done some quick tests and it now appears to work perfectly in English GB Access 365.
I've not tested the disabled sections of the form

1759591355372.png


Thank you for making the changes - it should help a lot of people - especially those new to Access

Two things:
1. I realise that Arabic is your first language but the vast majority of AWF members likely to find this useful would probably find the form easier to use if you could remove all the Arabic captions and just have captions in English.
2. The AND / OR option is superfluous for the first criteria. Remove it?
3. Minor quibbles - although it works as is, the criteria section has an unnecessary space at the start / end. Also lots of unnecessary square & curved brackets e.g.
1759592271026.png
 
Hi @isladogs
Thanks fo the review.
I've not tested the disabled sections of the form
The forms and reports sections are activated immediately after selecting the criteria source.
1759595371984.png

1. I realise that Arabic is your first language but the vast majority of AWF members likely to find this useful would probably find the form easier to use if you could remove all the Arabic captions and just have captions in English.
I hope so, as I’ve shared the same version with both Arab and global users.
2. The AND / OR option is superfluous for the first criteria. Remove it?
I tried to hide them for the first criteria only but I don't know how, as it is in a continues from, Can you guide me?
3. Minor quibbles - although it works as is, the criteria section has an unnecessary space at the start / end. Also lots of unnecessary square & curved brackets e.g.
I’ll work on removing extra spaces, but I added square brackets to prevent errors when naming objects and fields with spaces. While curved brackets are optional, you can choose "None" in their section.
1759596420232.png
 
1. That's my point. Having an English only version would be very helpful.

2. That should be possible by placing a button on top of the AND/OR option group and setting it transparent when the textbox CrNumTxt >1.
The code to do this goes in the Detail_Paint event:. Something like:
Code:
Private Sub Detail_Paint()
    Me.YourButtonName.Transparent = Me.CrNumTxt > 1
End Sub
Have a look at my article in this topic:

3. Ah - i hadn't realised what the 'Non' option settings did. You should be able to use code to include square brackets only where needed
 
Last edited:
If you kept the labels in the same order, Arabic and English, or vice versa, then it would be easy to manipulate the labels for either language?
 
2. That should be possible by placing a button on top of the AND/OR option group and setting it transparent when the textbox CrNumTxt >1.
The code to do this goes in the Detail_Paint event:. Something like:
I tried this before, and it didn’t work. Even if the command button is hidden, you cannot press or select (and/or).
3. Ah - i hadn't realised what the 'Non' option settings did. You should be able to use code to include square brackets only where needed
Since it’s working without any issues, I might leave it as it is for now.
 
I tried this before, and it didn’t work. Even if the command button is hidden, you cannot press or select (and/or).
I also found that the option group wasn't selectable in my first attempt.
That can probably be fixed but isn't important enough to spend a lot of time doing so.
 
@isladogs
Even if it is visible in the first criteria, I have considered in the code that it should be ignored, so don't worry.
 

Users who are viewing this thread

Back
Top Bottom