Autofill entry in record based on form

stevekos07

Registered User.
Local time
Today, 05:04
Joined
Jul 26, 2015
Messages
174
Hoping you can help. I want to be able to pre-fill records with information based on a form every day for each client. This needs to display in a datasheet view showing all clients for each location.
Each day the subform needs to show the expected results of that day's activity with clients if all default conditions are met. (i.e. client receives a call that day based on expected conditions calculated in a form for that day).
As a relative newcomer to Access, and not yet competent with VBA can you please make your as simple as possible :o.
 
Hi Steve

Your post is a little hard to understand, but if i understand correctly, you want to take information on a form and write it to other records to save time? If so you need an Append query. But to help further I think we would need some idea of the relevant tables and queries.
 
Thank you Isskint. Actually I have thought through this a little more and am a bit clearer on what I want now. (Sometimes it takes me time to get clear in my mind exactly what I really DO want!)
biggrin.gif
.

We operate a service calling clients with serious health problems every day to check on them. Some clients have other services coming in on various days, so I have a query which calculates the need for a call for every client based on various variable values which the query takes into account.

The main objects involved:
tblClients - contains client information.
tblCallHistory - contains information on the outcomes of calls.
qryCallsByDate - calculates the need for a client call that day based on a range of variables.

As we need to record an outcome for each client every day, what I want is for a new record to be produced every day for every client, with the default value of today's date, and other values in various fields based on this query. (The form I referred to earlier is based on the same query).

So what I really want is to have this main query run on opening of the form, to produce a 'Call Sheet' for each client. From there we can do what ever I want as far as subforms is concerned, and edit any variations to the defaults depending on the outcomes of the calls for that day.

I hope that this is a bit clearer.
 
Hi Steve

OK so yes you need an append query. Create a new query using qryCallsByDate as its record source. On the menu bar with the query editor open, you have a set of icons to indicate the query type (at this point it should say select). Click on the green + Append. THis will produce a box that will ask you which table you want to append data to. Select the table you want to produce the new records in (i guess tblCallHistory?). Then match the fields of the query with the fields in the table you want to add to (Date, ClientID or name etc) (have a look at the attached image). Save this query. Now all you need to do is decide how and when to run this query. It could be set up to run when you open the form as you mention, but unless the form is only opened once by one person, you will need a different way or else you will end up with multiple records every time someone opens it!
 

Attachments

  • Append.png
    Append.png
    17 KB · Views: 129

Users who are viewing this thread

Back
Top Bottom