Table Relationships

a10scourt

Registered User.
Local time
Today, 08:21
Joined
Jul 20, 2010
Messages
17
Hello everyone still pretty new, but the community here has been so helpful! So heres my possible, but probable issue: I was hoping someone could help me with the structure of my database. This is what I have.

What I am trying to accomplish is having the users be able to search, edit article information, and add articles. This works sometimes but other times, I have no idea what its doing, so I am reviewing everything from the ground up. So my question for my record source for these forms, should they be a query or the article table? With the exception of the author table, all the others (such as PubTable, EconTable, etc) are only tables because they are combo boxes and I find it easier for users to add stuff to tables rather then a value list. So any help would be much appreciated, I am still new to all of this and want to make sure I have the basics down :)
 
Relationships look ok to me.

What happens when something goes wrong?

What goes wrong? Explain further.

Bascially you have alot of combos linked to ref tables.
 
I attached the db and the backend data. The issue I am having is that the search form isn't pulling the data and I can't figure out why, which is why I was starting with the relationships.
 

Attachments

I can't open them files.

What type of search form you using?

I use something like this

Private Sub cmdSearch_Click()

On Error GoTo ErrorHandler

Me.Filter = "[fldLastName] = Me.fldLastName"
Me.FilterOn = True

ErrorHandlerExit:
Exit Sub
ErrorHandler:
If Err = 2001 Then
MsgBox "You have cancelled this operation"
End If

End Sub


Private Sub cmdReset_Click()
'Purpose: Clear all the search boxes in the Form Header, and show all records again.
Dim ctl As Control

'Clear all the controls in the Form Header section.
For Each ctl In Me.Section(acHeader).Controls
Select Case ctl.ControlType
Case acTextBox
ctl.Value = Null
Case acCheckBox
ctl.Value = False
End Select
Next

'Remove the form's filter.
Me.FilterOn = False
End Sub

Private Sub cmdStaffForm_Click()
On Error GoTo Err_cmdStaffForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_StaffContacts"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdStaffForm_Click:
Exit Sub
Err_cmdStaffForm_Click:
MsgBox Err.Description
Resume Exit_cmdStaffForm_Click

End Sub
 
Basically the exact same coding, I think it has to do with how its trying to grab the data from the record source. If I set the record source to just the article table, it will display the information fine, with the exception of the author information. But then I am missing the author information, so I use query builder in the form record source to create this code in the form's record source field:

SELECT Article.*, AuthorArticleBr.*, Author.* FROM Author INNER JOIN (Article INNER JOIN AuthorArticleBr ON Article.ArticleID = AuthorArticleBr.ArticleBr) ON Author.AuthorID = AuthorArticleBr.AuthorBr;

And I get nothing displayed on the search.
 

Users who are viewing this thread

Back
Top Bottom