Minggu, 17 Mei 2020

Re: [MSAccessProfessionals] Form not working as expected

Take a look at Allen Browne's solution at http://allenbrowne.com/ser-27-01.html

Duane

Sent from my mobile

On May 17, 2020, at 10:39 PM, M Garcia via groups.io <toukey1=yahoo.com@groups.io> wrote:


Hello Duane,

Sorry for the delayed response on this.

Based on your suggestion below, I created a table, tbldatevisited with the fields  VisitDate and CustomerID

I also have a tblcustomer table with the fields CustomerID, Custname, Custaddr and CustIdnum.

I went with your second option below which was to create a form based on tbldatevisited with the CustomerID bound to a combo box to select the customer.

So far it all works EXCEPT if it's a first time customer, I would like to enter the customer information on the form via the combo box but it's not allowing me to maybe as it's based on the CustomerID.  How can I accomplish this?

Mercy




On Friday, May 8, 2020, 06:39:18 PM GMT-4, Duane Hookom <duanehookom@hotmail.com> wrote:


If you are tracking customer visits, then you need a table with at least these fields:

CustomerID
VisitDate

You would typically add data to this table using a subform on a Customer main form. You could also simply create a form based on this table with the CustomerID bound to a combo box to select the appropriate customer.

Duane


From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of M Garcia via groups.io <toukey1=yahoo.com@groups.io>
Sent: Friday, May 8, 2020 5:03 PM
To: MSAccessProfessionals@groups.io <msaccessprofessionals@groups.io>; MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: Re: [MSAccessProfessionals] Form not working as expected
 
Hello Duane,

In my initial email I do have the tables and fields.  I am tracking customers visits hence the reason for the date field.  A customer can visit more than once but only once on any particular day.

Hope that helps.

On Friday, May 8, 2020, 11:54:57 AM GMT-4, Duane Hookom <duanehookom@hotmail.com> wrote:


It is difficult to answer without understanding the objectives of your application. What are the tables and fields and what exactly your tracking?

Duane

Sent from my mobile

On May 8, 2020, at 9:15 AM, luvmymelody via groups.io <luvmymelody=yahoo.com@groups.io> wrote:


Hello Mercy,

Why did you create the tbldaterec? Maybe I do not see the whole picture. You could have added the daterec filed to the table and made the field a date field and the user could choose from the dates or type it in. 

Jim Wagner


On Thursday, May 7, 2020, 09:06:36 PM MST, toukey1 via groups.io <toukey1=yahoo.com@groups.io> wrote:


I am building a small database to capture basic customer information.  I created a table called tblcustinfo with the following fields:
custid (primary), custname, custaddr, custidnum.  I built a query on this table and then a form based on the query.  On the form I have a combobox for the name field so that I can select the customer name and the other fields are populated correctly.  So far so good!

Then all hell broke loose when there was a need for a date field to record the date the customer comes in.  This is where I am stuck.  I created another table called tbldaterec with the fields dateid (primary) and daterec.  I added a dateid field in tblcustinfo and did a joined the tables on this field.  Am I going correct?  I amended the query to include the new table and daterec field.  However when I included the daterec field on the form, my combobox no longer works. Got an error like joined field not in recordset.

What I am trying to accomplish is when I open the form I select the customer from the combobox and it automatically populates besides the name, the address and idnum (this was working fine until I added the date field).  The date field is not to be automatically populated.

Where am I going wrong?

Regards
Mercy

Tidak ada komentar:

Posting Komentar