473,386 Members | 1,726 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,386 software developers and data experts.

creating forms

Hi,
I'm tasked to create a database which keeps track of all our active permits and when the permit fee is due. I can do all that using reports. Additionaly, I have to create two forms: one to obtain permit and second to terminate the permit. Information entered into the form to obtain the permit is used to keep track of active permits and permit fee. I'm having one heck of time getting it work.

I have created two forms both input data into a single table. First form is to obtain a permit before construction and second form is to terminate the permit at the end of construction. Second form doesn’t include all the information in the first form but majority of it is same. First form is working fine; but, I’m having a little problem getting the second form to behave the way I like. What I would like to do is select project ID from dropdown box and have most of the information entered from the table. I have tried two different approaches
1. Using two different tables, one for obtaining the permit and one to terminate e permit. In this case, I was able to recall information from the first table but wasn’t able to enter data records…it kept writing over the same record.
2. With the same table approach everything is fine, but I can’t pick project ID from dropdown box, I have to go through each record to get to the one I would like to create the notice of termination for. Is there a way, I can just pick the project ID from drop down box?

Any help I can get with this matter will be greatly appreciated.
Dec 6 '07 #1
2 1216
Jim Doherty
897 Expert 512MB
Hi,
I'm tasked to create a database which keeps track of all our active permits and when the permit fee is due. I can do all that using reports. Additionaly, I have to create two forms: one to obtain permit and second to terminate the permit. Information entered into the form to obtain the permit is used to keep track of active permits and permit fee. I'm having one heck of time getting it work.

I have created two forms both input data into a single table. First form is to obtain a permit before construction and second form is to terminate the permit at the end of construction. Second form doesn’t include all the information in the first form but majority of it is same. First form is working fine; but, I’m having a little problem getting the second form to behave the way I like. What I would like to do is select project ID from dropdown box and have most of the information entered from the table. I have tried two different approaches
1. Using two different tables, one for obtaining the permit and one to terminate e permit. In this case, I was able to recall information from the first table but wasn’t able to enter data records…it kept writing over the same record.
2. With the same table approach everything is fine, but I can’t pick project ID from dropdown box, I have to go through each record to get to the one I would like to create the notice of termination for. Is there a way, I can just pick the project ID from drop down box?

Any help I can get with this matter will be greatly appreciated.
Hi Shaffy and welcome to this forum!

Why can't you keep this within one table? if there is only a permit record per row and your field count is reasonable then a single table would be better for you.

My guess on your 'overwriting' thing you speak about that occurred when using a single table is because of your use of two forms to service one table and I am betting here that you had both forms open at the same time, causing a lock on the same table because it is the recordsource for each of your forms, so your table is in effect open in memory twice whilst editing.

I am sure you could do this project with 'one' form mounting the various fields that are needed to service the record either on the form itself or on various tab pages of a tab control mounted on one form. You might not know how to do it but you can always hide and unhide various controls or pages of a tab control based on certain logic that you make available to your application.

Selecting an ID from a dropdown to find a record based on the ID selected is a relatively easy thing but if it were me I would consider your design with a view to amalgamating it into one form if you possibly can?.

If you can't .....well the following code if placed in the 'afterupdate' event of your unbound combobox called cboProject will place the cursor in a field called ProjectID and find a record in the current forms dataset that matches the value of the ProjectID listed in the combobox. I,ll leave you to research the meaning of the different arguments to DoCmd FindRecord 'Access help' can outline these to you


Expand|Select|Wrap|Line Numbers
  1.  
  2. With CodeContextObject
  3.         DoCmd.GoToControl "ProjectID"
  4.         DoCmd.FindRecord .cboProject, acEntire, False, , False, , True
  5. End With
  6.  
Regards

Jim :)
Dec 7 '07 #2
Thanks for the reply. It worked like a charm. Thanks!
Reason for two forms is to mimic hard copy of the forms provided by the State agency.
Dec 10 '07 #3

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

Similar topics

0
by: Matt Warner | last post by:
Hi guys, A couple of people have already posted questions about similar issues but haven't had any response. Occasionally, sometimes after running the app for a few hours, it bombs out saying...
6
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle."...
2
by: Roby Eisenbraun Martins | last post by:
Hi, My name is Roby Eisenbraun Martins, I am a C++, VB and NET developer. I am working with a NET 2002 project right now and I am receiving this uncommon "OutOfMemory" error message when I try...
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...
2
by: Pawan | last post by:
Hi Guys, I have this current assignment where I have to develop online forms for local municipal authorities. I have to use adobe acrobat to create online forms from PDFs (which I have never done...
15
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use...
1
by: Flack | last post by:
Hey guys, Here is whats happening. I have a StringBuilder, a TextBox, and a TabControl with one TabPage. On my main form, I created and displayed a fairly big maze. While the app is solving...
0
by: =?Utf-8?B?c2Vy?= | last post by:
Hi, I am working on a windows application whose primary task is to apply all the properties of one control to another. Hence i am using the SetValue method of the PropertyDescriptor. The...
0
by: =?Utf-8?B?TWFyaw==?= | last post by:
Users of an in-house application we have written randomly get an Error creating window handle exception, and we've not been able to determine why this happens. A typical callstack is as follows: ...
4
by: sklett | last post by:
I've developed an ERP application that we use internally and works quite well. I receiving more and more requests from users to print various transactions, order forms, search results, etc. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.