Topic: need help please

hello all

first excuse me for my bad english

i am new in visual database

i am student and i want to help my teachers and my school

i created student database and need some help

i want add items to combobox but i do not know

i do not know how to insert image in this post

please see attached image in my file

thanks for help

Post's attachments

Attachment icon help.rar 361.81 kb, 302 downloads since 2020-11-27 

2 (edited by derek 2020-11-27 15:29:34)

Re: need help please

Hello Kofa,
There are a couple of ways to do this, but the normal way is as follows:
1.
Create additional tables for each entity that you want to have a combobox for (in your example - classes, sections and nationalities).
2..
Remove the class, section and nationality fields from the 'students' table and replace them with relationships to the classes, sections and nationalities tables
3.
In Form1, replace the class, section and nationalities edit fields with comboboxes and set them up so that they are part of the search criteria (in the same way as you have already done for the other edit fields).
4.
Create a data entry screen for the class, section and nationality data - there are many different ways to do this but in the attached example, I have used a page control and added a new tab sheet (called Reference Tables).
Hope this helps,
Derek.

Post's attachments

Attachment icon kofa2.zip 476.53 kb, 360 downloads since 2020-11-27 

3 (edited by agusecc 2020-11-27 16:25:27)

Re: need help please

insert image (student photo)

Post's attachments

Attachment icon kofa3.rar 436.73 kb, 354 downloads since 2020-11-27 

Re: need help please

hello derek and agusecc

thank you very much

i am very happy

thanks for help

5 (edited by kofa 2020-11-27 20:04:22)

Re: need help please

hello derek and agusecc

I would like to ask for new help

i add new buttons to add and delete a new item to combobox

it is possible

thanks for help

Post's attachments

Attachment icon help2.rar 368.93 kb, 325 downloads since 2020-11-27 

Re: need help please

Good day. Add form and call the New Record Action on the add button. As for the delete button, I think it is better to just use the Reference Table from Form1 for most of the time, it will fail because of the foreign key. It can be done by script but personally, I wouldn't recommend it.

Post's attachments

Attachment icon help3.zip 572.94 kb, 318 downloads since 2020-11-27 

brian

Re: need help please

hello brian.zaballa

thank you very much

I will try to understand the steps to complete my project

thanks for help

8 (edited by kofa 2020-11-28 05:17:52)

Re: need help please

hello all

I would like to ask for new help

I noticed that the first element in combobox is empty, how to change it to  = choose all

excuse me for more questions but i am very happy to learn it

thanks for help

Post's attachments

Attachment icon help4.rar 369.12 kb, 319 downloads since 2020-11-28 

Re: need help please

kofa wrote:

hello all

I would like to ask for new help

I noticed that the first element in combobox is empty, how to change it to  = choose all

excuse me for more questions but i am very happy to learn it

thanks for help

Just uncheck the FirstEmptyItem on the property of the Combobox. See attached picture

Post's attachments

Attachment icon img.png 35.55 kb, 154 downloads since 2020-11-28 

brian

Re: need help please

hello brian.zaballa

thanks for your help

but i want in first runtime combobox text=please chosse class .

thanks for your help and time

Re: need help please

hello all

I succeeded in getting the table cells to be centered by this code

var i,j:Integer;
j:=Form1.Table.Columns.Count-1;
  for i:=0 to j do
  begin
    Form1.Table.Columns[i].Alignment:=taCenter;
    
   // Form1.Table.Columns[i].Title.Alignment:=taCenter; // wrong code
    //Form1.Table.Columns[i].HorizontalAlign := TTextAlign.Leading; // wrong code
    

    end;

but I was not successful in getting the header to be centered

any help for this problem

thanks for help

12 (edited by CDB 2020-11-28 09:25:28)

Re: need help please

There are two ways of centering a header.

1. (and the easiest)  use the options in settings for the tablegrid as per image attached.


2. In script   Form1.TABLE.columns[column number].Header.Alignment := taCenter;

Post's attachments

Attachment icon centering.PNG 122.98 kb, 153 downloads since 2020-11-28 

On a clear disk you can seek forever

Re: need help please

hello CDB

thank you very much

number 1 is very easy

can you help me to set first combobox element= please choose class

thanks for help

Re: need help please

Hello Kofa, CDB, Brian, Agusec,
If you set the first combobox element = 'please choose class, then you'll probably want to be doing it for all your comboboxes and edit fields.  This can start to make your form look rather 'busy'.
A different option is to use hints which only display when the user hovers over a specific object.  Hint work on most objects - so you can set a hint for a combobox, a datetimepicker, an edit field, a button, a label etc etc.  The advantage of this is that the approach is consistent, so your user always gets the same style of help no matter what they're doing.
Hints are very easy to set up - have a look at the screenshot which sets up a hint for a combobox - it is exactly the same for all other objects.
Derek.

Post's attachments

Attachment icon kofa.jpg 290.26 kb, 152 downloads since 2020-11-28 

Re: need help please

hello derek

thanks for advance

i have idea but i do not know to do it

can you change empty  element text to (all)

it means search all data

and by code if combobox.text=all then search all data in column

thanks for all
thanks for help

16 (edited by kofa 2020-11-28 20:35:50)

Re: need help please

hello all

i have a new problem

i tired to fill row data to text boxes and comboboxes

i want when i click on any row , fill this row into text boxes and comboboxes

please see attached pic

thanks for help

Post's attachments

Attachment icon help5.rar 565.17 kb, 298 downloads since 2020-11-28 

Re: need help please

Hi Kofa,
What you are trying to do is use the same form (Form1) for both displaying your data and maintaining your data.
So, you need to reference Form1 and not Form2 in your 'add' and 'edit' buttons.
This is not really the 'standard' way that MVD works, but it can be done.  The main problem is accidently creating duplicate or blank records.  This can be avoided by making some of your fields mandatory and then by clearing those fields once you have performed an update.
Have a look at the attachment for one way to do this.
I've also added a calculated field to show which students currently have a photo (otherwise you have to go in and out of each record).
Derek.

Post's attachments

Attachment icon help5 fixed.zip 485.18 kb, 329 downloads since 2020-11-29 

Re: need help please

hello derek

What I want is when I single click on the any row fill data into fields not double click

in Ring programming Language i do this idea

check = true

if check = true   

search function work

if check = false

search function not work

when i click row do this
check = false
fill data to fields
check = true

-----------------------------------------------

is it possible in visual database ????

thanks for help

19 (edited by agusecc 2020-11-29 22:53:09)

Re: need help please

Hello Kofa,
please see attacment, maybe help you

Post's attachments

Attachment icon help6 fixed.rar 378.51 kb, 334 downloads since 2020-11-29 

Re: need help please

thank you agusecc

very good work

i will study this form to  understand it

now i tired to set combobox alignment = center

can you solve it

thanks for help
happy time

Re: need help please

hello all

I would like to ask for new help

what is the wrong in this code

Form1.Edit1.Text:=Form1.TableGrid1.Cells[Form1.TableGrid1.CurrentRow,5]

the error message is undeclared identifier CurrentRow

thanks for help

22 (edited by CDB 2020-11-30 10:12:45)

Re: need help please

Kofa,


Your problem is there is no such property Current Row available in MVD. What might work (and I haven't tried it) is:


Form1.Edit1.Text:=Form1.TableGrid1.Cells[Form1.TableGrid1.SelectedRow,5]

or if you have clicked on a row then simply in the click event

Form1.Edit1.Text:=Form1.TableGrid1.Cells[ARow,5]
On a clear disk you can seek forever

23 (edited by derek 2020-11-30 13:48:28)

Re: need help please

See the attached.
It now works off a single form with incremental searching disabled when editing records (with a single click), all as requested.
It is not possible to centre align values in comboboxes

Post's attachments

Attachment icon help7.zip 479.8 kb, 378 downloads since 2020-11-30 

Re: need help please

hello derek

send me the attached file please

how can i make message   box  (  Are you sure to add + student name + to database    )   &  (  Are you sure to edit + student name   ) 

thanks for help

Re: need help please

hello derek

i am very happy for help7

can you complete professional form

make message   box  (  Are you sure to add + student name + to database    )   &  (  Are you sure to edit + student name   )

thank you very very much