473,473 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Form looking for Parameters in field name that was changed.

klarae99
85 New Member
Hi everyone, I am new to Access 2003 (though my time on scripts has helped alot) and am creating an inventory database. In my original table design I had a field tblTrans.Date which I was advised to change as Date is a function. I changed the field name to TransDate. All of the previously created queries and reports automatically updated to use this new field name as a reference and still work fine.

Now I am creating a new unbound form to find a specific Item; the form has two cascading comboboxes that select vendor and then item number. I created a command button that theoretically opens frmProduct using the item combobox to filter the results (I used the command button wizard to create this). When I click the button a prompt asking for the parameter tblTrans.Date pops up.

I have looked in all of the event procedures, queries, and rowsources I can think of to find where the this reference is and have had no luck.

Is there any way I can 'search' for this 'field reference' or view the sequence of events for everything involved to try and locate this reference?

Does anyone have any ideas about how I might fix this issue? I would appreciate any advice or thoughts. Thanks!!
Oct 19 '07 #1
12 1954
nico5038
3,080 Recognized Expert Specialist
There are some places where variables can hide.
When the form is based on a query, open the query and double-click the grey area besides the table(s). A properties window should show and there sometimes the sort or filter still holds an "old" variable.

Nic;o)
Oct 19 '07 #2
klarae99
85 New Member
Thanks for the tip, the form I am working with is an unbound form, and I had already checked the queries for the comboboxes that were on my form.

Your advice got me thinking though and I realized that the form I was trying to open up (frmProducts) had a subform (frmTrans) sorted by the transaction date. I opened frmtrans and it still referenced Date so I changed it to TransDate.

I no longer get the prompt for TransDate but I still get a blank form when I click on the OK button. I tried to create a new OK button after closing everything and saving changes but I still got a blank form (filtered and only displaying 1 record). I also created a new form with the same two comboboxes and a completely new OK button and it also opened a filtered blank form.

I also noticed that in the subform trans, the sort by date is not working.

Do you have any ideas why either of these things may be occuring and if you do, how do I fix them.

Thanks for all your help!
Oct 22 '07 #3
nico5038
3,080 Recognized Expert Specialist
Make sure that not only the Controlsource has been changed, but also the Name property (see under Other tab).
Also single-click the subform and check under the DataTab the linkage fields to hold the correct fields.
Finally check the blank form's properties under the Data tab, the "Data entry" property needs to be set to "No".

Nic;o)
Oct 22 '07 #4
klarae99
85 New Member
Nic;o)

Thanks for the ideas, I looked at all of the tips that you gave me, the Name property did not match the control source of my transdate field so I changed it. All of the other settings that you suggested I verified and no changes were necessary.

I again tried to pull up a record and opened a blank form again. Any other thoughts?
Oct 23 '07 #5
nico5038
3,080 Recognized Expert Specialist
Nope, best to zip and attach the .mdb so I can have a look.

Nic;o)
Oct 23 '07 #6
klarae99
85 New Member
Thanks so much for your offer!

From passed experience I know that I can not zip my whole database and get it small enough to attach to a post, I will go through and create a new database to import the relevant tables, queries and forms to and zip that to see if it will be small enough for you to review.

It may take me a little while but I hope to have it up soon!
Attached Files
File Type: zip ParameterQuestion.zip (94.5 KB, 109 views)
Oct 23 '07 #7
nico5038
3,080 Recognized Expert Specialist
Strange, no TransDate popup for me :-(

I do see you're using a macro to open a form, better to use:
Expand|Select|Wrap|Line Numbers
  1. Private Sub btnNewItem_Click()
  2.  
  3.     DoCmd.OpenForm "frmproduct", , , "VendorID=" & Me.VenID
  4.  
  5. End Sub
  6.  
Passing the VendorID will fill the info on the frmProduct.
Perhaps checking my sample .mdb migh show an alternative way to select Vendors. Personally I would have a Vendor form with the products as a subform.
http://www.geocities.com/nico5038/xS...tAction-97.zip
and
http://www.geocities.com/nico5038/xS...et-Combo97.zip
I use the Object/Action in general and give my users this description so they can select the row(s) themselves:
http://www.geocities.com/nico5038/xR...nstruction.zip

Nic;o)
Oct 24 '07 #8
klarae99
85 New Member
Nic;o)

Thanks for the resources I will look into them to see what I can glean as soon as I get back on a computer with Access loaded. I will also see about changing the Macro to code.

As for you not getting the TransDate popup, I don't either (see post Oct. 22), my issue now is that even when I enter data into the comboboxes on my frmaddedit, when I click OK I get a blank Product form (1 record filtered) instead of the form with that products information. I have tried to delete and recreate the command button, and still get the same results. Did you also have this problem? Do you have any suggestions about what may be happening if you don't?

All your help and advice is greatly appreciated. Thanks!
Oct 25 '07 #9
nico5038
3,080 Recognized Expert Specialist
Just try the proposed code from my previous post and see the effect :-)

Nic;o)
Oct 25 '07 #10
klarae99
85 New Member
Nic;o)

Sorry for the long delay in getting back to you, my boss was in town and I had to shift my attention to other things for a while. I am back to working on the database now.

I am confused regarding your last post...I am using macros with btnNewItem and btnNewVen, both of which work as I expected them to, when I changed btnNewItem to the code you suggested I ended up with all of the items that that paticular vendor already had in inventory, which is not what I wanted to see.

The button I am having trouble with is btnOK, which has its current on click procedure as the following code:

Expand|Select|Wrap|Line Numbers
  1. Private Sub btnOK_Click()
  2. On Error GoTo Err_btnOK_Click
  3.  
  4.     Dim stDocName As String
  5.     Dim stLinkCriteria As String
  6.  
  7.     stDocName = "FrmProduct"
  8.  
  9.     stLinkCriteria = "[Item]=" & "'" & Me![ItemID] & "'"
  10.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  11.  
  12. Exit_btnOK_Click:
  13.     Exit Sub
  14.  
  15. Err_btnOK_Click:
  16.     MsgBox Err.Description
  17.     Resume Exit_btnOK_Click
  18.  
  19. End Sub
Unfortunately when I click on this button I always get a blank form, not the form with the corresponding item number. I really do not understand why. Any help would be appreciated.
Oct 31 '07 #11
nico5038
3,080 Recognized Expert Specialist
Nasty one, you've used "qryitembyvendor" with a VendID and an ItemID as source.
The boundcolumn is however the first column, so the vendorID ('25) is passed instead of the ItemID :-(
So:
1) Change the Bound column for the ItemID combobox from 1 to 2
2) Change the stCriteria to trigger the frmProduct into:
Expand|Select|Wrap|Line Numbers
  1.     stLinkCriteria = "[VendorID]=" & Me.VenID & " and [Item]=" & "'" & Me![ItemID] & "'"
  2.  
Nic;o)
Oct 31 '07 #12
klarae99
85 New Member
Thank you! Thank you! Thank you!

Its working great now, thanks for getting this to work for me!! I REALLY appreciate all the time you dedicated to this!

Also, I will work on changing the macros for the other two buttons to code, I know that most people who work regularly with access prefer code to macros but I needed to get this to a working level and my codeing skills (as you can see) are still very early in their development. Now I can go back and tweak things and my boss won't get so agravated with me takeing too long.

Again, thanks for all your help with this!
Nov 1 '07 #13

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

Similar topics

8
by: Matt Herson | last post by:
I have been trying to find a way to use JavaScript to change the value of a hidden field on submit. I am already invoking a JavaScript to handle the validation on submit. The reason I need to...
10
by: Andres Eduardo Hernando | last post by:
Hi, I'm not entirely sure this is the right group to ask this question, but I saw a similar one above, and the group's charter is not clear enough about it, so, here I go: ;) What is the...
10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
14
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought...
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...
25
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
8
by: Doug Lerner | last post by:
I have this snippet of client side code running: var makeField = document.forms; alert("makeFieldName name,length,type=" + makeFieldName + ", " + makeField.name + "," + makeField.length + ","...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
4
by: Matt | last post by:
I have the following in a page and I am trying to update a record on the next page but for some reason the form data is not carrying over. Any ideas why? <form name=nxtlupdate method=post...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
1
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...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.