I.T. Discussion Community!
-Collapse +Expand
Access
Search Access Group:

Advanced
-Collapse +Expand Access To/From
To/FromCODEGuides
-Collapse +Expand Access Store
PRESTWOODSTORE

Prestwood eMagazine

April Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyMicrosoft Access BoardMS Access Interactive Topic   Print This     

Form questions...

Form questions... in MS Access Interactive topic (part of our Microsoft Access group).

Quick Search: questions   Form questions   Form questions   
gsempcb
Tyler, TX USA

(Keep in mind my questions come from someone with little to no practice of VisualBasic. I understand basically how it works, and have taken one class on it; but am nowhere near fluent in it.)

 1. How do you go about having a text field on a form set up so that right when user gets to the form, a Message Box or Input Box (with accompanying space for user to type) appears saying "Enter Date", so that whatever user enters into that message box is entered into the text field? I'd want to set it up this way so that a user (who will be inputting more data on the form associated with that date) gets prompted for it immediately when going to the form. Then after putting it in, it just sticks there and stays around, because there's two more subforms within this main form that are linked to the various data that's input to the form--such as the date--and that repeat the data.

Snapshot of Form

 (just btw, "Week Ending" is the one I want the prompt for, "Developer" is just something that'll be passed through each time, and "Project ID" is a primary key that'll be passed through each time.)

Quote from another topic:

Quote:
MsgBox is good. But it won't let the user type anything. InputBox will, but not MsgBox.

You can also [ask a Question in square brackets] in a form / report or query. Doing that prompts the user for Enter Parameter Value and that value is returned to the object that has the question in brackets.
/Quote

By InputBox, do you mean TextBox? I know they're not the same, but I'm not seeing an InputBox on the toolbox of all the form tools (like with TextBox, Label, ComboBox, etc.) And the only help topic in my Help files having to do with "InputBox Function" links me to a Japanese MSDN site. I'm aware of making the "Insert Parameter Value" prompt show up on a query by placing a [statement enclosed in brackets] in the "criteria" section of a given field. However, I do not know where to enclose [a statement in brackets] that triggers an "Enter Parameter Value" pop-up for a text-box on a form. I've tried inserting [Enter Date] in the control source, in the "Build" areas, as simply the name of the text-box, and I just can't seem to get any sort of prompt for user to enter value to pop up like I used to could in the query I was working with. I tried writing a module in VB for an InputBox. But I'm pretty sure my syntax was wrong or I'm not doing something basic, because in the Expression builder, the name of my Module shows up, but I can't seem to select anything out of it.

2. In this same form I am asking about, like I said, it is a main form with two subforms. This is regarding the first of two subforms: Is it possible, when making a subform and linking various fields to the main form (so that whatever user inputs to one field on one form is automatically passed to the given field in the subform), to do this with more than three fields per subform? The create subform wizard only lets me choose three fields to do this with. And when I try to edit in Design view via the "Link Child Fields" and "Link Master Fields" in the Properties for the subform by putting another semi-colon and enter more field(s), it seems to throw the whole set-up off.

3. In this same form I am asking about, like I said, it is a main form with two subforms. This is regarding the second of two subforms: The second subform displays some of the fields that have been entered in by the above two forms in Datasheet view. So

  • the main form at the top's got three fields users put stuff in
  • the second one, the subform, has got a few fields users put stuff in
  • the third one is datasheet-view, and it displays the different fields (but also lets user change it from down there if necessary)

So say I want to set this up to where the datasheet subform makes a new row of data for the different fields, each time that middle subform is filled out, field-by-field. Ok, no problem--it does that already, now. However, what if when I tab out of the last field on that first subform (middle collection of fields), I loop right around to the top of that subform, and enter in some new pieces of data, then when tabbing out of the last field in the middle again, it adds another record/row to the datasheet down below? See currently, it does place a new record in the datasheet-view-subform below, but ONLY one--I cannot add any more, or have a collection of them. These fields do draw from queries and table, so is there a way I can write some sort of macro to take affect such that after a user fills out the last field in the first subform (middle collection of fields) and it puts the data in the datasheet-form, then reloads the query so that when the user loops back to the top of the second form, whatever he inputs into the fields this time will yield a second record/row in the datasheet view down below?

Snapshot of Form

 (just btw, "Week Ending" is the one I want the prompt for, "Developer" is just something that'll be passed through each time, and "Project ID" is a primary key that'll be passed through each time.)

 Posted 12 years ago (Thread Starter)
Comment Quote
About gsempcb -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #12889, 3 replies
Thread Started 6/24/2008 9:40:58 AM
View Counter=3429
Last Reply Posted 6/25/2008 4:01:38 PM)
Location=Tyler, TX USA 
Joined=12 years ago   MB Posts=24  
Daniel Fought
Prestwood IT
Home office in Fresno, CA.

First a quick google search turned up this link.

http://office.microsoft.com/en-gb/access/HA012288561033.aspx

Second why not simply make the field a required field by setting the validation rule, no vb coding needed.

Third what are the fields linking the master form to the subforms?  I see only three available fields.  How were you going to use more fields to link the forms?

Dan Fought
Senior Programmer Analyst
Prestwood IT Solutions
http://www.prestwood.com

 Posted 12 years ago
Comment Quote
About Daniel Fought -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Daniel Fought
Danial Fought is a senior programmer analyst with Prestwood IT where he develops custom Windows software and custom websites. When Dan is not coding for clients, he participates in this online community. Coding specialties include Paradox/ObjectPAL, MS Access, Visual Basic, and VS.Net/VB.Net.

Post ID #12890 (Level 1.1)  Reply to 12889
Thread Started 6/24/2008 2:48:17 PM
Location=Home office in Fresno, CA. 
Joined=18 years ago   MB Posts=401   KB Posts=12   KB Comments=4  
gsempcb
Tyler, TX USA
Quote:
Originally Posted by dfought

First a quick google search turned up this link.

http://office.microsoft.com/en-gb/access/HA012288561033.aspx

Second why not simply make the field a required field by setting the validation rule, no vb coding needed.

Third what are the fields linking the master form to the subforms?  I see only three available fields.  How were you going to use more fields to link the forms?

Thanks for that site--I'd already come across it, and tried both

  • Just the
    InputBox (EnterDate)
    line of code
  • As well as that really long example they give at the bottom of the page--except I had changed a few of the variable names and messages to reflect my particular case.

And I guess due to own limited experience with VB, I could not get it to save correctly, or something (it would bring up something about creating a new macro), and I could never link to it correctly from ithin the expression editor, for that date text field. Plus, I am not totally sure if whatever I tried to do was without error--the code itself--either.

Regarding the linkages in my form(s):

  • the three fields in the master form/at the top are going to bleed over into the next one, and then the last one.
  • there are six fields in the second one: two are the ones that will bleed over from the top, three are user-inputted, and one is calculated (just a sum of the user-typed one, and I may end up scrapping this one).
  • the final datasheet form has five fields (six if I end up keeping the other I said I might be dropping), four from the middle form, and the date one from the very top.

Incidentally, the table from which I'm working (that supplies all these fields, and that I'm inputting back into) was originally constructed by someone else. The table has three fields that are primary keys, and two of them are ones I put at the top of the master form that bleed over into the two subforms.

Thank you for the reply--I appreciate any other feedback you, or anyone else offers.

 Posted 12 years ago (Thread Starter)
Comment Quote
About gsempcb -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #12891 (Level 1.2)  Reply to 12889
Reply Posted 6/24/2008 3:36:07 PM
Location=Tyler, TX USA 
Joined=12 years ago   MB Posts=24  
Most Recent Post
gsempcb
Tyler, TX USA

Double-posting I know, sorry, but I do have an update.

Ok, taking a break from the question about having some sort of InputBox/MsgBox/Pop-up box to enter in the date (I'd still like any help and take any suggestions on this, as I'm still not where I want to be with it), here's my next question, regarding forms/subforms.

2. I'm not doing the two-subforms-inside-one-main-form anymore. Here's a snapshot of how I've re-structured this thing:

Snapshot of form-new

So right now, three of them are linked, between form and subform--how can I link all five of them? That is, you put it in at the top, and it goes to the one under it in the datasheet subform. Right now it does it with three of the fields, because that's all the wizard let me set up--is there any way (and if so, how?)--to do it with all five fields?

 Posted 12 years ago (Thread Starter)
Comment Quote
About gsempcb -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #12896 (Level 1.3)  Reply to 12889
Reply Posted 6/25/2008 4:01:38 PM
Location=Tyler, TX USA 
Joined=12 years ago   MB Posts=24  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P184A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #12889 Counter
3429
Since 6/24/2008

Follow PrestwoodBoards on: 


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech