Exercices to practice relationship (1 Viewer)

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:42
Joined
Feb 28, 2001
Messages
26,999
OK, so your issue is VBA code. One possibility for your update is a command button for which there is a button wizard. It lets you choose what to run, and that could include running a query that could perform your update for you.

Here's a thought...

Access has code wizards that build things for you - like event procedures. The button wizard builds code. The combo box and list box wizards can build code. So in a dummy database, one designed only for learning and experiments, build some of those things and then look at what gets built. Understand that the wizards will give you only the minimum amount of VBA to do the job - but that will show you in code how certain things are done in VBA.

Since Access itself is the MAIN segment (that's in strict programming terms) of the MSACCESS.EXE program, you can't see what it does. BUT the power of Access is to give you a way - with VBA - to interact with the main program through event procedures. Everything you write in VBA is either a direct or indirect event procedure. So use the wizards to show you what it takes to get the job done. Then as you do some reading in this forum, you can see code samples that "customize" those event procedures.
 

vba_php

Forum Troll
Local time
Today, 10:42
Joined
Oct 6, 2019
Messages
2,884
I mean that's too much at this point in time
 

vba_php

Forum Troll
Local time
Today, 10:42
Joined
Oct 6, 2019
Messages
2,884
You two guys can dislike all you want but I'm telling you the truth based on what I know. But I do think that last post of yours Richard is a little milder than some of the other machine like responses you've given in the past
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 11:42
Joined
Apr 27, 2015
Messages
6,281
Let's keep it with the OP's question and leave all other content out shall we?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:42
Joined
Feb 28, 2001
Messages
26,999
Adam, when people come here, they want answers and suggestions. This isn't primarily a social venue. If my answers sometimes seem almost machine-like, it is because I am consciously avoiding personalities, at least until I can scope out the situation.
 

vba_php

Forum Troll
Local time
Today, 10:42
Joined
Oct 6, 2019
Messages
2,884
understood, richard. i'm simply warning you to keep it away from young people and beginners. they are emotional and discouraged easily.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:42
Joined
Feb 28, 2001
Messages
26,999
Adam: Your own experience here seems to demonstrate the lie inherent in that statement.
 

vba_php

Forum Troll
Local time
Today, 10:42
Joined
Oct 6, 2019
Messages
2,884
i'm a bit tired of your nonsense, old man. lets end this. the question asker needs to read all this before we get into another public argument. why don't you open yourself to PM's here? you have them shut off! we can argue until the cows come home if you just allowed that.
 

zeroaccess

Active member
Local time
Today, 10:42
Joined
Jan 30, 2020
Messages
671
Hello everybody
thanks for all your advices and answers.

with term automaticly i mean that when user return the item that the status changes automaticly to avaliable...now i create that with s
statement insert into table...becouse of that i have 5 separates tables and i complicated all by myself...
i dont want to have combobox and then user will choose available...in use or longer time...
i want that will change automaticy...and with that i create it is.. is working but i am thinking that this was not good idea...
My question is, how does the computer know the item is returned? How does it know to change the status?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:42
Joined
Feb 28, 2001
Messages
26,999
Start a thread in the Watercooler, Adam. I'll be watching.
 

zeroaccess

Active member
Local time
Today, 10:42
Joined
Jan 30, 2020
Messages
671
i'm a bit tired of your nonsense, old man. lets end this. the question asker needs to read all this before we get into another public argument.
Not really. It would be better if these posts didn't pollute the thread. Maybe they would have an easier time solving their Access problems.
 

lacampeona

Registered User.
Local time
Today, 16:42
Joined
Dec 28, 2015
Messages
392
Hello everbody

hey hey what is going on here? please why you experts Adam and Richard are talking in that way? you have so much knowledge about vba and ms access and also respect about each one ( I am sure about that) please dont argue you dont have to talk in this way . you are good boys. I understand that some people give answers in one way some people give ansers in another way. in my opinion the best help to begginers is to show the answer , help with examples....of course also with some theory and words but i learn more with examples. like in the school profesor with students. examples...


Dont worry Adam about other answers, finally I managed to make something what i want.
I read all the articles from Rogers database and I learn something. I didnt know nothing about normal forms and normalization and ER. is very insteresting. maybe me should study programing and not chemistry and pharmacy :)

Best regards to all
Elena
 

lacampeona

Registered User.
Local time
Today, 16:42
Joined
Dec 28, 2015
Messages
392
My question is, how does the computer know the item is returned? How does it know to change the status?

computer dont know that...i create a button ..when user click on the button the item will be returned and will be avaliable again.
 

jdraw

Super Moderator
Staff member
Local time
Today, 11:42
Joined
Jan 23, 2006
Messages
15,364
Hi Elena,
Glad to see the RogersAccessLibrary material was helpful.
I read all the articles from Rogers database and I learn something.

Did you work through the examples?
 

lacampeona

Registered User.
Local time
Today, 16:42
Joined
Dec 28, 2015
Messages
392
Yes I print all 5 articles and all 5 exercises.
I never think that for create database you have to draw some diagrams....i thought that all that programer has in the head and he just write. the code in one hour..or more and then is working..
is very interesting...
i discover that my problem was that i didnt know what to put in the other tables to have connections...i was conviced that if i have 3 tables that is .i didnt think that maybe i should create more tables... and then make connections..

now i manage to create some sense...but then i have problems in the form...if i have automaticly user inside ( funcion get user name? then the form is not saving the results becouse i have relationship...so i make without the relationship..but for query use then i create realtionship..

thank you very much for Richards articles
Elena
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:42
Joined
Feb 28, 2001
Messages
26,999
Elena, I am going to give you some advice that is best used when first creating a project. There are two rules to understand. They have very wide influence over what you do. I call them my "Old Programmer Rules." (I am, after all, old.)

Rule #1: If you can't do it on paper, you can't do it in Access.

This means that you must know ahead of time, perhaps using paper drawings of data flow or a list of processing steps, what you want Access to do. This is because Access is an expert in one AND ONLY ONE thing: Making databases. YOU are the expert on the subject of your database. Access does not know about accounting or engineering or inventory or school attendance. But the person who writes a database application for one of those topics WILL know about them. You treat Access like you treat carpentry tools. You use it to make things. But if you don't know about the things you want to make, you can't make them.

Therefore, draw out your database symbolically to see ahead of time how things will have to fit together to get the job done. The first couple of times you try this, it will seem very difficult. But like anything else, it is a matter of practicing and learning the skill. You learn this skill by doing it.

Rule #2: Access won't tell you anything you didn't tell it first.

This means that if you want to get something OUT of Access, you have to find a way to put that something INTO Access. If you want get a report on XYZ, either you have to have a data source containing XYZ, or - if possible - you have to provide X, Y, and Z and the formula that turns X, Y, and Z into XYZ so you can provide it later. If you followed rule #1 then you KNOW what you want to do. So one by one, for each of your desired outputs, verify that you know how to PRODUCE those outputs. This sometimes means working backwards through your design.

These two rules are simply stated but they have far-reaching implications. IF you follow them, you will find less trouble later on when debugging what you created.

As to the issues between me and Adam, that is a long story and I will not engage in personalities. He and I have taken our dispute to another area of the forum. I am sorry you had to see any of that.
 

Users who are viewing this thread

Top Bottom