Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Follow up issue

Status
Not open for further replies.
Sep 12, 2007
45
US

This is a follow up issue to the ones I posted in the ‘Forms’ and ‘Tables & Relationships’ forums.

The users of the summary report wish to enter data related to each customer interaction by clicking on the scheduled date in the summary report.

This works fine if they are clicking on a date in the past (where data already exists in the table) but does not work as well when new data is to be entered.

The way the data entry needs to be set up is as follows:

The user will click a command button on the customer’s main information form named ‘interactions’. This will result in a report being displayed with both the scheduled as well as the actual interaction/meeting dates. The summary report is based on the same (now highly normalized) table discussed in the earlier postings.

When the user clicks on a particular date, a data entry form is displayed. If this is a date in the past, the form displays all the data entered earlier (form is based on a query based on the normalized table).

I have used stDocName and ‘stLinkCriteria’ with CustOrgID (integer), CustOrgDivID (integer), InteractNumber (integer) to pick each unique interaction/meeting when opening the data entry form as shown below:.


Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = ""
stDocName = "frm_Customerxxxxx" ‘Data entry form

stLinkCriteria = "[CustOrgID] = 1 And [CustOrgDivID] = 1 And [InteractNumber] = 1"

DoCmd.OpenForm stDocName, , , stLinkCriteria

This arrangement works as it should with data present in the table but not when new data is to be entered i.e. the interaction number is displayed as a zero and the scheduled date is blank on the data entry form.

All I need is for the InteractNumber and scheduled date to be displayed on the entry form. The other “routine” data is already being pulled on the data entry form by using dlookup.

Since the ‘scheduled date’ is a text box (whose ‘On Click’ property is used to open data entry form) on the summary report, is there a way to display the ‘interactnumber’ and ‘scheduled date’ on the data entry form when new data is being entered?

Thank you for your inputs.
 
Without reading the previous posts, it sounds like you need the form to open to a new record?
DoCmd.GoToRecord , , acNewRec


To have the 'interactnumber' and 'scheduled date' show just use the DLookup as you did for the report.

I hope I correctly understood what you're looking for.
 
Thanks for your input, Laurie and sorry for the late response.

I managed to find a solution for the issue.

I added the following two lines to the subroutine stated in my original post:

Forms(stDocName)![InteractNumber] = 1
Forms(stDocName)![ScheduledDate] = Me![ActualDate] + 30

Now the InteractNumber and ScheduleDate are displayed as required on the data entry form.

Thank you for your suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top