Quick question with attached database

mickelingon

Registered User.
Local time
Today, 17:45
Joined
Feb 3, 2006
Messages
72
Hi

I've run in to some problems and I can't get it right in my head.
I have a name search form and a form that I want to be able to access through a button (don't want to use subform).
I want data to be connected between these to forms.

Example:

If I type "lar" in the "last name" field and press enter.
It displays info about the person.
Then I click on the button and displays the next form.
I want to fill in information for the person searched.

Then I want to search for another person ex "karl" in the "last name" field and do the same thing but with other values in the form opened with the button.

Help anyone

Regards
Mikael
 

Attachments

Hello Mikael!

Here it is look at attecment.
1) I think you have to learn something about PRIMARY KEY, FOREIGN KEY and
RELATIONSHIPS.
2) You have no records in "Smartanalys_bild_tbl", (I added some).
3) In this tbl you have no FOREIGN KEY, (I added).
4) Look at RELATIONSHIPS.
5) I rearranged your forms a little.
 

Attachments

Thank you very much

That's exactly what I wanted.
I knew it had to do with relationship between the tables.
I tried a lot of different ways, but it didn't work.
I will study your example and try to understand it.

thanks

Mikael
 
One question though

If I enter a new post (name) and push the button to enter the form and want to enter some new info.
It returns an error.
Do I have to fill out the FK numbers by hand? To get it to work?

Mikael
 
Hi again

Here is db attached for the error problem.
If I want to add a knew post and then add posts to the form opened by the button it doesn't work.
How can you solve this?

Use the form searchaddress.....

Thanks for all help
 

Attachments

Hello Mikael!

I suggest you the best way for this is a SUBFORM.
Look at db33.mdb, I added 1 record in subform for ID 1.
 

Attachments

Hi again

I did try the subform before I posted the question and that works fine.
But the finished program will have a large picture, so that's why I wanted to open it with a button in it's own window.

any suggestions?
 

Users who are viewing this thread

Back
Top Bottom