By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,704 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

creating forms

P: 20
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
Share this Question
Share on Google+
2 Replies


Jim Doherty
Expert 100+
P: 897
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

P: 20
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

Post your reply

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