I have this code when a txtBox loses its focus.
Private Sub txtSearch_LostFocus()
Dim sSQL As String
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\stock.mdb"
cn.Open
Set rs = New ADODB.Recordset 'adds to quantity...
Thanks JoeAtWork, I checked my fields and barcodein was indeed an integer. Changed it to text and the SQL works like a charm.
How did you know from the code I posted that the 'barcodein' field had to be text as opposed to an int?
I'm trying to add 2 fields from a database using SQL. They are both numbers and once added together and stored in another field, the result will be displayed in a text box. However, I have tried every permutation of fields and adding I can think of (apart from the correct one obviously) and I...
Thanks for that. Basically everyone would use the same db and inventory and it would only be available on one PC. I was thinking of a web based front end but that would mean having some sort of server and I don't think that would be a go. There might be a spare PC lying around that could be used...
I'm trying to build an app for work. It's going to use access as the db as it's the easiest for me. I need to have a simple front end.
So here's my dilemma. I am not, and no-one in work is, an administrator and so unable to install apps onto work PCs. I want to be able to copy and paste the app...
tsuji,
Too easy wasn't it. I've been staring at this problem for the best part of this evening. I managed to get where I got to, and then hit the wall. It sometimes takes a fresh pair of eyes. That is exactly what I wanted.
However, I've spent another hour still trying to get it to work. This...
Not sure if this is a PHP question or a XML question, so I'll ask it here first.
I have a database in mysql and I am making a gallery from it. I found a 'flash' gallery that works from a xml file. I don't want to keep amending my files as and when I add an image, so I'm trying to make it...
Thanks for replying. I think everyone else hasn't stopped laughing at such an easy answer. Anyway, as with most times I post on here I eventually figure it.
I changed this:
<a href="<?php echo $_SERVER['PHP_SELF']; ?>
to:
<a href="../images/<?php echo $row['filename']; ?>"
and it works like I...
I hope some of you out there can shed some light on a problem for me. Hopefully this won't be as stupidly easy as my last 'problem'.
So, I have a dynamically created gallery and I decided to incorporate lightbox 2.0 into it. This is the section that creates the gallery.
<td><a href="<?php echo...
I've been following a tutorial and adapting it to my own needs. I want to display the last article I entered but knowing the code is a bit confusing. Here's what I have at the moment.
// connect to the database
$conn = dbConnect('admin');
// check for article_id in query string
if...
jpadie, thanks for your help. Unfortunately I still get the error, so I scrapped what I was doing and found another tutorial (?easier to understand to me?) and re-wrote the page. This time it doesn't reference another page.
<?php
// we must never forget to start the session
session_start()...
On my form I have a textbox and a button. The textbox searches my database and returns a true or false value.(Yes it is in the database or No it's not) This works well. The button is a button and not submit. There is an 'onclick' value which uses another page to do the searching and returns the...
I'll add my experience.
I downloaded all the bits and pieces to run php (php, apache and mysql) and gave up when I couldn't get them all to run. I since discovered easyphp and it runs like a dream. So, if like me, you don't want wasted time and headaches look at easyphp.
<?php
if (isset($_POST['submit'])){
if ($_POST['submit'] === "save & continue"){
savedata();
header('Location:members.php');
} else {
savedata();
//redisplay the current page
header('Location:untitled.php');
}
}
function savedata(){
// set your infomation...
I have a form on my page which has a button. The button inserts values from textboxes into the db. Easy peasy. I would like to have 2 buttons. One that inserts the values and simply returns to the same page so the user can add more values. The second button adds the values and moves to the next...
had a bit of a play and got it working.
if($sInfo == '') {
if($oResult = mysql_query($sQuery) and ysql_num_rows($oResult) > 0) {
$aValues = ysql_fetch_array($oResult,MYSQL_ASSOC);
$sInfo = "Member registered";
} else {
$sInfo = "Member not registered.";
}...
I have a club site that has a membership system. I would like guests to search for usernames to see if they are registered.(Only to say username is registered or not, no other details) It uses ajax (hence why this post is in this thread) to say whether or not username is regsitered. It all...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.