« 6TH POPE Home | Email msg. | Reply to msg. | Post new | Board info. Previous | Home | Next

Re: Access Question for Zimbler

By: Decomposed in 6TH POPE | Recommend this post (0)
Mon, 23 May 22 4:35 AM | 25 view(s)
Boardmark this board | 6th Edition Pope Board
Msg. 32184 of 60008
(This msg. is a reply to 32181 by Zimbler0)

Jump:
Jump to board:
Jump to msg. #

Zimbler0:

Re: “Are you sure you shouldn't be using something like ' form2.TextBox1.Text=form1.TextBox1.Text '
to get the data out of the field of your data input form?”
Naw. I wasn't trying to compare one form's field to a different form's field. I was trying to get an alert as I enter a book into a form to the effect that the title is already present in the table the form saves to. If it's in there twice, I wanted to see "2". If three times, "3". Etc. And if it's not already in the table, I didn't want any alert at all.

Seemingly so easy, but wow was it hard. The problem is that I'm inexperienced and this was the very first piece of code I've written. Next time I try to add some VB to the database, I'll have something that works to examine. That'll help.
Re: “Good times.”Not!







Avatar

Gold is $1,581/oz today. When it hits $2,000, it will be up 26.5%. Let's see how long that takes. - De 3/11/2013 - ANSWER: 7 Years, 5 Months


- - - - -
View Replies (1) »



» You can also:
- - - - -
The above is a reply to the following message:
Re: Access Question for Zimbler
By: Zimbler0
in 6TH POPE
Mon, 23 May 22 3:31 AM
Msg. 32181 of 60008

Decomposed > [frmMedia].[Title]

Am I right in thinking that that is a table and field?
Are you sure you shouldn't be using something like ' form2.TextBox1.Text=form1.TextBox1.Text '
to get the data out of the field of your data input form?

http://stackoverflow.com/questions/13578670/how-to-pass-value-of-a-textbox-from-one-form-to-another-form


I'm thinking I may have created a 'hidden text field' on a form, and tucked a string into it. Then VBA was able to access the hidden field (Or was it my query was able to access the hidden field?)

Right, the hidden fields I used were for storing a date selected with a calendar form. And I needed to get the date out of the calendar (on the form) and put it somewhere where my query could read it and give me the appropriate date related data.

I have a memory of wanting to query the shop log, and I wanted to insert three text strings to search the data base for. One to limit the equipment I was searching for, one for the problem field, and one for the solution field.

So I had three fields on the form to input the search criteria. And VBA would take the three variables and search the database for anything that matched all three strings.

Good times.

Zim.


« 6TH POPE Home | Email msg. | Reply to msg. | Post new | Board info. Previous | Home | Next