473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Form Control - Query, then adjust

17
This might be a freshman question, but is there a way to have a field in a form be populated by a query, and then be adjusted by the user?

I want to have a sub-form that populates data automatically based on matching criteria in the form, but gives the user the option of "overwriting". One they close the form, any changes are written as a new record to a specified table (that part I can do).
Sep 24 '07 #1
1 1394
This might be a freshman question, but is there a way to have a field in a form be populated by a query, and then be adjusted by the user?

I want to have a sub-form that populates data automatically based on matching criteria in the form, but gives the user the option of "overwriting". One they close the form, any changes are written as a new record to a specified table (that part I can do).
I'm just about to do something just like this with a continuous form; the context is that I'm creating a health clinic diary with multiple practitioners/clinics where the appointment slots vary from week to week. I store appointment data in tblDiary. When adding in future clinics I want to use a default clinic template for each practitioner, stored in tblDiaryTemplate (imaginative, isn't it!). Then I want the user to be able to use the template as a basis but change details like appointmet slot times, clinician, location and so on; and then append the end result to the tblDiary; and if desired, overwrite the current template with this new clinic definition in tblDiaryTemplate; and then revisit that revised template later on. I don't want users making direct, running changes to the underlying tables as they really need to be able to see the whole clinic before saving changes. So I want users working outside of those two tables. Is this similar to your context? If so....

My plan is to set up unbound fields in a my form to match the tables I'm talking about, populate the unbound fields by (in VBA) using the CreateTableDef method (covered in Help) to to create a temporary table holding the queried tblDiaryTemplate data, changing the forms recordsource to the temptable at that point which will allow me to edit the results; then append the edited data to tblDiary via the on_click event of a cmdButton; if user wishes, run a delete query to remove previous template from tblDiaryTemplate, and an append query (Insert Into) to replace with the new clinic definiton. Though I'll use buttons this could all be done on e.g. the forms afterupdate event or other appropriate event.

HTH's
Kevin
Sep 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jim | last post by:
I have this chart on a form. I'm trying to get this chart to render only if the user chooses to do so. This because of that the chart is quite complex and takes some time to render. I know that I...
1
by: longtim | last post by:
I have been having endless difficulty creating reports/queries that set any relevent parameters from controls in forms. I am creating an application under access 2003 but will target access...
7
by: Mike | last post by:
Hi! I posted this question in browser_ctl group as well but got no results. I have a form with embedded WebBrowser. Upon clicking on a link in the embedded webbrowser that calls JavaScript's...
6
by: kaosyeti | last post by:
hey.... i have a duplicate record issue i could use some help with. on a form that has 2 unbound controls, txtboxyear and cboxmonth, together will automatically fill in an invisible txtboxdate...
13
by: salad | last post by:
Operating in A97. I didn't receive much of a response conserning Pivot tables in Access. Pivot tables are nice, but a CrossTab will work for me too. Using a Pivot table, one is actually...
3
scubak1w1
by: scubak1w1 | last post by:
Hello, I posted this in the HTML forum, but it was suggested I post it over here as well by a moderator. I have a form that will not 'fire' in non-IE browsers?? I have poked and poked at the code...
2
by: Zippy | last post by:
I have a mainform with two subforms controls (SF1 & SF2) for user input. There is a very slight difference in functionality between the two and I would therefore like both SF1 and SF2 to show the...
1
by: dittu | last post by:
How to close the popup window when submitting the form? I have a sample.jsp. In that page one button is there. when button pressed, open popup window contains one "text box" and one " submit...
12
by: GLEberts | last post by:
I made an addition to a form I was using and it threw a wrench into the works for my ability to adjust the calculation. I am trying to sum a unbound control calculation in a continous form. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.