×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

grid table
3

grid table

grid table

(OP)
is the code that I wrote have a many mistakes ?
especially for entering datetime into the gridtable

[img









RE: grid table

We are not mind readers! Try to see it from our side. I can't speak for anyone else, but personally I have absolutely no idea of what you are asking. None!

Maybe if you try to explain exactly what you want to achieve, we can help you.

And last, please use a better description for your question! Grid table is a meaningless description when others want to search for help if they have a similar problem.

RE: grid table

Please read - and take notice - of my post in thread184-1821531: command contains unrecognized pharse / keyword concerning your posting of screen shots.

Frankly, you are asking much too much of us if you expect us to try to read or understand the code in the three screen shots that you posted above, especially as you have provided no context and no information about the errors you are seeing (if in fact you are seeing errors; that's not clear either).

I'm afraid you won't get any useful help in this forum unless you can explain your problem in a simple logical way and in plain English. Simply dumping screen shots in a forum post is just lazy.

Please also take note of what Tore said (above) and what I said (in an earlier thread) about choosing sensible subject titles for your threads.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: grid table

2
To me it's obvious you want to learn or you must learn VFP. It's totally fair that you have many questions, but please, really, post your code in text form, stop just posting screenshots, that's not at all helpful.

You could get going yourself if you take error messages as a chance to learn and look up whatever you don't understand. I know for a beginner the messages can be very cryptic, but if you don't know a term, search for it in the help, to at least get a better understanding of the error message.

There are also videos that teach you the basics of many things in VFP: https://www.garfieldhudson.com/free-videos.html
I suggest you go through all of them, as they will answer a lot of your questions by giving you the foundations to even talk about your problems.

Chriss

RE: grid table

merpati89

I agree with everyone who replied to you.
I suspect that you find it difficult to write in English exactly what your problem is because it is not your mother tongue.
btw - i have that too.

But imagine if everyone here asked their question in such a way that it reads "I have a question", or "Grid" or some other useless title.
Then the forum would be worthless because you can't find anything.

3 recommendations:

sNo. 1
Begin each query title with "How to....", and then describe the exact problem.
You don't go to a doctor with the comment: "I'm sick", but you tell him WHERE and WHAT; SINCE WHEN and if the problem only occurred ONCE - etc.

No. 2
Use the GOOGLE translator for the description

https://translate.google.de/?hl=de&sl=en&t...

For example, this complete text was translated from German into English.
The program translates from about 120 languages into English and very well. Then we would all understand you better.

No. 3
It would be nice if you would give us an answer - proper communication is not useful with hard copies.

Kind regards
Klaus

Peace worldwide - it starts here...

RE: grid table

Quote (Klaus)

For example, this complete text was translated from German into English

Impressive. A perfect job!

Steve (U.S.)

Translation: Beeindruckend. Perfekter Beruf!

RE: grid table

Steve,

Quote (Translation: Beeindruckend. Perfekter Beruf! )

with "Job" it is a little bit complicated.

When you say "I did a good job" then in Germany we say :"Ich habe gute Arbeit geleistet" and "Arbeit" means the same as "work" in English.
However -when your job is a good one, then we say "Ich habe einen guten Beruf" and also "Ich habe einen" guten Job" - in English: I have a good job"

Therefore in this case it is better to say: Beeindruckend. Perfekte Arbeit or Perfekter Job.

Interesting: English: I have a good job, but now I've done a bad job.
German: Ich habe einen guten Beruf, aber jetzt habe ich schlechte Arbeit geleistet.

Klaus


Peace worldwide - it starts here...

RE: grid table

Thank you, Klaus. My mom's 1st language was German. She taught it. Obviously it didn't rub off on me. My total German vocabulary is now 2 words (I think). ponytails

As in English, I suspect a single word may have multiple meanings and tenses, etc. Anyone who does crossword puzzles (like myself) surely is aware of that.

Steve

RE: grid table

I think you want to insert a record into the table. The way I would do it:

CODE -->

IF EMPTY(thisform.text1.value)
MessageBox("You must enter value") thisform.text1.SetFocus() RETURN
ENDIF IF EMPTY(thisform.text2.value)
MessageBox("You must enter value") thisform.text2.SetFocus() RETURN
ENDIF IF thisform.optiongroup1.value = 1
lcKendaraan = "MOTOR"
ELSE
lcKendaraan = "MOBIL"
ENDIF lcWarna = ALLTRIM(thisform.text1.value) lcPlat = ALLTRIM(thisform.text2.value) INSERT INTO table1 (kendaraan, warna, plat, wmasuk) VALUES (lcKendaraan, lcWarna, lcPlat, DATETIME()) thisform.grdTable1.Refresh()

As for the controls, I would give better names to them. Using Text1, Text2, grdTable1, and optiongroup1 does not give any meaningful explanation as to what the control is for. I would suggest opgKendarann, txtWarna, txtPlat, and the grid named for the table name that should also have a meaningful name.

Greg

RE: grid table

Quote (Greg I think you want to)


That's actually where the problem begins. Some screenshots and the introducing text don't indicate to me, what is the intention of that experiment. To learn about the grid (the thread title indicates that) or about table handling. In the end, the code does the least part with the grid itself.

It will not motivate merpati89 to formulate better questions, if you give answers, I held back what I could say about the errors, as it just tells merpati89 he still gets through. I also think it's better to first have a foundation before you make your own experiments. So I hope merpati89 has taken the hint and does work through Garfield Hudsons videos.

Chriss

RE: grid table

Chris--

I disagree, his code does indicate what he wants to do -- he adds a record to the table (APPEND BLANK), and then updates the record with the values from the form controls; however, he was getting the error with the attempt to assign the DATETIME() value. I agree he does not ask his question very well and it is better not to use screen shots as he has done; although there are occasions for a screen shot.

I used to do the same type of coding back in the late 80's and early 90's (APPEND BLANK with subsequent multiple REPLACE commands). I later learned to use a single REPLACE command with each field comma separated:

CODE -->

REPLACE field1 WITH "Value1", ;
        field2 WITH "Value2", ;
        field3 WITH "Value3" 

This improved the speed as the record was updated with a single command for all fields. Then later the SQL command was available, and I began using the INSERT command (don't remember the release) which is faster than the APPEND BLANK and REPLACE combination. I hope I gave Admad some things to think about in adding records to tables.

Greg

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close