Error 3341 - please help (1 Viewer)

Zenobia

Registered User.
Local time
Today, 08:35
Joined
Jan 28, 2011
Messages
35
Hello,

I have three tables
StockList
CustomerDetails
HireHistory

Of which i have created a query based form to issue the rental i.e. to select customer number and to select rental code and therefore issue rental

however i have a error code come up saying "The current field must match the join key <name> in the table that serves as the 'one' side of one-to-many relationship. (Error 3341)"

I just dont understand how to fix this, i have tried to read and try many things all not working, any help i'd be extremely thankful
 

Zenobia

Registered User.
Local time
Today, 08:35
Joined
Jan 28, 2011
Messages
35
Here is what I have set up thus far

Thank you in advance
 

Attachments

  • relationshipandquery.jpg
    relationshipandquery.jpg
    99.9 KB · Views: 190

Zenobia

Registered User.
Local time
Today, 08:35
Joined
Jan 28, 2011
Messages
35
And this is the error message when i try to allocate a customer number to a rental code
 

Attachments

  • errormessage.jpg
    errormessage.jpg
    92.7 KB · Views: 151

boblarson

Smeghead
Local time
Today, 00:35
Joined
Jan 12, 2001
Messages
32,059
Why did you not upload your database here and put it on a file sharing site instead?
 

Zenobia

Registered User.
Local time
Today, 08:35
Joined
Jan 28, 2011
Messages
35
Because mu database is 5mb and this only allows 2mb - I dont have winzip
 

boblarson

Smeghead
Local time
Today, 00:35
Joined
Jan 12, 2001
Messages
32,059
I dont have winzip

Did you run Compact and Repair? And, are you on Windows XP or above. If on XP or above you can simply right-click on the file and select SEND TO > COMPRESSED FOLDER (which turns out to give you a .zip file).
 

Zenobia

Registered User.
Local time
Today, 08:35
Joined
Jan 28, 2011
Messages
35
I see, excellent Here it is
(please note i have deleted some forms that are not involved in this question because it was still too big)
 

Attachments

  • Current (2).zip
    1.9 MB · Views: 125

boblarson

Smeghead
Local time
Today, 00:35
Joined
Jan 12, 2001
Messages
32,059
Okay, your problem is that you are trying to do too much with one query for the main form's record source. You can't have all three tables in that. You need to break some of that up into a subform. I would have the Customer Details as the main form and then a subform on that form for Hire Details and if you want the stock list on the form too, that would need to be a subform. But I would have it separated but have a selection combo box for Hire Details to select from the stock.
 

Zenobia

Registered User.
Local time
Today, 08:35
Joined
Jan 28, 2011
Messages
35
Ok, thank you very much bob, I shall retry that, fingers crossed.
 

Users who are viewing this thread

Top Bottom