Not "new" but not "experienced"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am not new to access but am new to some of the more detailed programming. I
have a couple of minor things than need to be solved and unfortunately I am
on my own with no one to ask. So, having said that, I have a several
"troublesome" items.

1) I built a 'queue' for my end users to select "unfinished" items by
clicking a hyperlink which will pull the item number through to the main form
on formload but I need to run the cmdSearch and I don't quite know how to
program that. The item number lands exactly where I need to but I need to
pull in data from another table and populate several fields. How do I run the
command?

2) I need to calc an age based on two fields. If the DateCompleted field is
null, the I need to calc the date using Date()-DateReceived otherwise if the
DateCompleted field is not null, then calc the age
DateCompleted-DateReceived. I have looked in the ACCESS2003 bible and many
discussion forums and i can't quite get there. It continues to return an
"error" #NAME

Thanks in advance for everyone's help!!!!!
 
Two questions would be best posted as two separate items.

2) Use the NZ function.
Nz(DateCompleted,Date()) - DateReceived
If DateCompleted is Null, the NZ function will return the Date() and if
DateCompleted is not null it will return the value in DateCompleted.

1) I have no idea. You talk about hyperlink to pull an item number, then
you talk about formload event, and then you want to run cmdSearch. I'm
sorry but I don't see the linkage in any of that. I am guessing that
cmdSearch is the name of a button on your form. Do you want to run code
that is executed when you click on the button? You will need to post more
details on this problem. I suggest you do so in a separate posting with
more details - your code, etc.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top