Please Help... Forms are now my nightmare!

JKK

Registered User.
Local time
Tomorrow, 01:21
Joined
May 4, 2011
Messages
19
Hi guys,

I'm new to Access. I have had experience in designing tables and queries but that is as far as it goes for my "expertise". I now find myself trying to make 2 forms - one to enter info and the other to update the current info already stored in the database.

I have the tables, and the layout of the forms done, but still cant get things to work. I've spent a good few hours with little success.

The database is basically to store companies details who would like to advertise with me; each company would have contact people which I work with and their details must be stored; my staff members would contact these people and record the minutes and details of the meetings.

I want to link these aspects and be able to add new companies, contact people and meeting details as well as update those details already stored.

I have attached my database while masking the details within. Please help me to spot my errors.View attachment Ads DB.accdb

I will be forever grateful...
 
The two forms are named "frmEditCompany" and "frmAddCompany" the others are used as subforms...
 
If possible, downgrade your database to a .mdb lots of users dont have access 2007 yet.

Good luck!
 
im my exprience i add form using this vb code put in the button

DoCmd.OpenForm "form name", acNormal
DoCmd.GoToRecord , , acNewRec
if you hit the button you will be connected to a new form with no records....

hope it helps..
 
Thank you both for your quick response.

I apologize for not using a mdb file. It is attached.

I'm sorry, I am not understanding you as well as I'd like; Are you suggesting I make a new form?

At the moment I have this code:

Private Sub NameOfCompany_Change()

BeenContacted = DLookup("BeenContacted", "tblCompanies", "NameOfCompany = '" & Forms("frmEditCompany").frmAddCompanyMainNDE.Form.NameOfCompany & "' ")

DateContacted = DLookup("DateContacted", "tblCompanies", "NameOfCompany = '" & Forms("frmEditCompany").frmAddCompanyMainNDE.Form.NameOfCompany & "' ")

ReferralBy = DLookup("ReferralBy", "tblCompanies", "NameOfCompany = '" & Forms("frmEditCompany").frmAddCompanyMainNDE.Form.NameOfCompany & "' ")

ClientPriority = DLookup("ClientPriority", "tblCompanies", "NameOfCompany = '" & Forms("frmEditCompany").frmAddCompanyMainNDE.Form.NameOfCompany & "' ")

Website = DLookup("Website", "tblCompanyParticulars", "CompanyID = " & Forms("frmEditCompany").frmClientDetailsNDE.Form.CompanyID)​
End Sub

I am using this in an attempt to have fields (from 3 tables) displayed when the user chooses a NameOfCompany (Primary key) from a drop-down-box.

I can't find where I made the error...
 

Attachments

Users who are viewing this thread

Back
Top Bottom