Table/form/relationships

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am building a databse with 4 tables and one form. I am feeding all the info
from the different tables into the form through one Query. I have set up a
listbox which I use to select an entry based upon a presort, then it displays
in the form.

The tables I have are: "accounts" , "debtors", "clients", and "Employees."
The form I have is titled "form1"
The queries I have are "Query1"

The listbox is sorted through a few different querys, each on it's on tab.
For example one tab is to sort by name so the query is called "presortname"
and only shows the fields for "AccountID" "DebtorFullName"

I have no relationships setup between any of my tables yet, but suspect that
I need them to display data correctly.

Sorry about the length of this post, but I want to make my question as
specific and clear as possible.

Here's an example of the problem I am having:

I have two fields on my form. One to display the AccountID and one to
display the "DebtorFullName." When I click on my selection in my listbox it
wil change the AccountID back and forth based on my selection, but it will
not update the DebtorFullName box.

I suspect a relationship issue, but I just don't know enough or understand
enough to solve this myself.

Can anyone help?
 
Here's a sample of the coding for the listbox to display my data on my form:

Private Sub Alphasort_AfterUpdate()
DoCmd.OpenForm "Form1", , , _
"[Query1.AccountID]=" & "'" & Me.Alphasort.Column(0) & "'"
End Sub
----------------------------------------------------
Private Sub Alphasort_DblClick(Cancel As Integer)
If Not IsNull(Alphasort) Then
ShowRecord_Click
End If
End Sub
-------------------------------------------------------
 
Back
Top